go-gitver/examples/special-name
AJ ONeal 3409d5f2e4 update examples 2020-10-12 14:46:35 -06:00
..
tools complete transition to v2 2020-10-12 14:42:55 -06:00
version complete transition to v2 2020-10-12 14:42:55 -06:00
README.md rename outfile xversion.go to lower init() priority, add outfile option 2019-06-21 00:01:02 -06:00
go.mod update examples 2020-10-12 14:46:35 -06:00
main.go complete transition to v2 2020-10-12 14:42:55 -06:00

README.md

Example

Prints the version or a nice message

Doesn't have a separate tools package

This is just like examples/sub-package except that its //go:generate is in main.go and it outputs ./version/zversion.go instead of xversion.go.

See examples/basic for more details.

Demo

go mod tidy
go mod vendor
go generate -mod=vendor ./...
go build -mod=vendor -o hello *.go
./hello
./hello --version