version
whzbox version prints the build metadata embedded in the current binary.
Syntax
whzbox version
whzbox --version
Arguments
This command takes no positional arguments.
Flags
This command uses only the global flags.
Behavior
- Prints the version string assembled from the embedded
Version,Commit, andBuildTimevalues. - Uses a lightweight app path that does not initialize the state store or network adapters.
- Binaries built directly from source without linker flags report the fallback values
dev,none, andunknown. - GoReleaser snapshot builds embed
v0.0.0-devplus the current commit and build timestamp. - Tagged GoReleaser release builds embed the Git tag version plus the corresponding commit and build timestamp.
Output
The output format is:
whzbox <version> (<commit>) built <build-time>
When the binary is built without linker flags, the default values are:
- version:
dev - commit:
none - build time:
unknown
Exit behavior
0on success1on generic command failure