New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
将静态文件打包到二进制中 #169
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当前
serve
端构建二进制后,仍需要拷贝config.yaml
、resource/...
资源到机器中才可以执行我试验了https://github.com/go-bindata/go-bindata 这个仓库所实现的功能
应该可以实现该功能,并做到对原有功能没有影响
需要在
core
中_ import
实现该功能的包可能需要在
main.go
中增加一条//go:generate go-bindata XXX
(应该也可以放到该功能所新增的go文件中)在需要该功能时,编译二进制前 需要go get 上面的仓库,执行 go:generate 命令,
然后
go build -tags=XXX
即可使用计划如果使用该功能后,为了与现有方式最大兼容,在程序启动时,将所需文件从内存写入到对应的位置,继续运行程序
@piexlmax gva有这方面的需要吗? 有需要的话我可以继续实现下,后续提交PR
The text was updated successfully, but these errors were encountered: