How do I give it an icon?
There doesn't seem to be any build flags to do this, and I know golang doesn't support resources.
.rsrc
See as an example the lxn/walk application, which embeds other metadata in its executable.
rsrc [-manifest FILE.exe.manifest] [-ico FILE.ico[,FILE2.ico...]] -o FILE.syso
-ico=""
This differs from embedding binary data into a go program.
For that, use jteeuwen/go-bindata.
Asset(string) []byte
data := Asset("pub/style/foo.css")
if len(data) == 0 {
// Asset was not found.
}
// use asset data
这篇关于你如何在golang中设置应用程序图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!