go-gitver/examples/sub-package
AJ ONeal 9f05e2304c rename outfile xversion.go to lower init() priority, add outfile option 2019-06-21 00:01:02 -06:00
..
tools fix docs, add more docs, allow different package name 2019-06-20 23:27:41 -06:00
version fix docs, add more docs, allow different package name 2019-06-20 23:27:41 -06:00
README.md fix docs, add more docs, allow different package name 2019-06-20 23:27:41 -06:00
go.mod rename outfile xversion.go to lower init() priority, add outfile option 2019-06-21 00:01:02 -06:00
main.go fix docs, add more docs, allow different package name 2019-06-20 23:27:41 -06:00

README.md

Example

Prints the version or a nice message

Put version in its own packge

This is just like examples/basic, but it uses the package name version instead of main.

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