Skip to content

Commit

Permalink
show sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Feb 12, 2023
1 parent cb0d3df commit ca7fdc3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,30 @@ var shortVersion, longVersion, fullVersion := version.FromBuildInfo()
```

Complete example in [sample/simpleMain.go](sample/simpleMain.go)

Yielding:
```shell
$ go install fortio.org/version/sample@latest
go: downloading fortio.org/version v1.0.0
$ ~/go/bin/sample -h
fortio.org/version sample main 1.0.0 usage:
/Users/dl/go/bin/sample [flags]
flags:
-buildinfo
Show full build info and exit.
$ ~/go/bin/sample -buildinfo
1.0.0 h1:JbGoGiNQ0883KoVPDsYhQCQ32QkAVTtECn86XVRRYi4= go1.19.5 arm64 darwin
go go1.19.5
path fortio.org/version/sample
mod fortio.org/version v1.0.0 h1:JbGoGiNQ0883KoVPDsYhQCQ32QkAVTtECn86XVRRYi4=
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=arm64
build GOOS=darwin
$ ~/go/bin/sample
2023/02/12 13:34:37 fortio.org/version sample main started 1.0.0 h1:JbGoGiNQ0883KoVPDsYhQCQ32QkAVTtECn86XVRRYi4= go1.19.5 arm64 darwin
```

0 comments on commit ca7fdc3

Please sign in to comment.