Go


Setting variables in a package on build time

Setting variables in a package on build time When building a go binary its possible to add ldflags in order to variables in build time (Like version numbers) and this is pretty well documented. But setting variables in internal/vendoring directories it not well documented. This is how its done test # tree . ├── cmd │ └── cli │ └── main.go ├── internal │ └── cmd │ └── version.go test/cmd/cli/main.