go-gitver/examples/no-tools
AJ ONeal cfbbc73f48 complete transition to v2 2020-10-12 14:42:55 -06:00
..
README.md fix docs, add more docs, allow different package name 2019-06-20 23:27:41 -06:00
go.mod complete transition to v2 2020-10-12 14:42:55 -06:00
main.go complete transition to v2 2020-10-12 14:42:55 -06:00
tools.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/basic, but it uses a normal file with a build tag rather than a tools package.

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