How do you set the application icon in golang?

前端 未结 5 886
抹茶落季
抹茶落季 2021-01-30 09:14

I\'ve just created my first go application on Windows.

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

5条回答
  •  失恋的感觉
    2021-01-30 09:49

    This worked out for me

    go get github.com/akavel/rsrc
    rsrc -ico YOUR_ICON_FILE_NAME.ico
    go build
    

提交回复
热议问题