Skip to content

Instantly share code, notes, and snippets.

@D00MFist
Created April 10, 2020 22:33
Show Gist options
  • Save D00MFist/5062e7866f6ebbc9359b29b4157ed673 to your computer and use it in GitHub Desktop.
Save D00MFist/5062e7866f6ebbc9359b29b4157ed673 to your computer and use it in GitHub Desktop.
Add meta data to go binary
go get github.com\josephspurrier\goversioninfo
build the main.go in cmd/goversioninfo
edit the version.json and copy to the location of the main.go want to add metadata to
Add below to the top of source code
//go:generate C:\Users\Leo\Desktop\workspace\src\github.com\josephspurrier\goversioninfo\cmd\goversioninfo\main.exe
go generate
go build
can still use upx and data remains
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment