Hi golang-nuts, As far as I know, there are two approaches to add extra information at build time: 1. using -ldflags="-X path/pkg.Var=${ENV_VAR}", in a Makefile 2. using `go generate ./...`, before `go build`
These approaches are good as it is if I build my binary and distribute it to other users. However, none of these are possible if a user uses `go get github.com/user/pkg/cmd/x-cli`, because: 1. `go get` does not understand Makefile 2. `go generate` does not execute with `go build` automatically. What should I do in order to plug the extra information (in my case, the git version) if my user uses "go get"? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/530a2119-8d1a-430e-ade0-a109af897be1n%40googlegroups.com.