<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go:embed on PlumePHP</title><link>https://plumephp.com/tags/goembed/</link><description>Recent content in Go:embed on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Fri, 14 Aug 2026 18:10:53 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/goembed/index.xml" rel="self" type="application/rss+xml"/><item><title>go:embed：把文件打包进二进制</title><link>https://plumephp.com/go-embed-static-assets/</link><pubDate>Mon, 05 Apr 2021 11:30:00 +0800</pubDate><guid>https://plumephp.com/go-embed-static-assets/</guid><description>&lt;h2 id="goembed把文件打包进二进制"&gt;go:embed：把文件打包进二进制&lt;/h2&gt;
&lt;p&gt;你有没有遇到过这样的烦恼？&lt;/p&gt;
&lt;p&gt;编译好的 Go 程序发给别人，结果对方说：&amp;ldquo;怎么打开是 404 啊？&amp;rdquo; 你一看，原来是因为 HTML 模板、CSS 文件、图片这些静态资源没有一起打包过去。类似的问题还有：部署时需要额外复制配置文件、数据库迁移脚本散落在各处、前端构建产物忘记上传到服务器……&lt;/p&gt;</description></item></channel></rss>