Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more details to the -V flag #37

Open
e-minguez opened this issue Feb 20, 2024 · 0 comments
Open

Add more details to the -V flag #37

e-minguez opened this issue Feb 20, 2024 · 0 comments

Comments

@e-minguez
Copy link

e-minguez commented Feb 20, 2024

Usually golang binaries include some more metadata (such as git commit, build date, go version, etc.):

9de807f7344f:~ # /usr/local/bin/nmc -V
nmc 0.1.0
9de807f7344f:~ # /usr/local/bin/hauler version
 __    __       ___       __    __   __       _______ .______
|  |  |  |     /   \     |  |  |  | |  |     |   ____||   _  \
|  |__|  |    /  ^  \    |  |  |  | |  |     |  |__   |  |_)  |
|   __   |   /  /_\  \   |  |  |  | |  |     |   __|  |      /
|  |  |  |  /  _____  \  |  `--'  | |  `----.|  |____ |  |\  \----.
|__|  |__| /__/     \__\  \______/  |_______||_______|| _| `._____|
hauler: Airgap Swiss Army Knife

GitVersion:    1.0.0
GitCommit:     79b240d
GitTreeState:  clean
BuildDate:     2024-02-20T13:02:55Z
GoVersion:     go1.21.7
Compiler:      gc
Platform:      linux/arm64

9de807f7344f:~ # /usr/bin/podman version
Client:       Podman Engine
Version:      4.8.3
API Version:  4.8.3
Go Version:   go1.21.5
Built:        Thu Jan  4 12:00:00 2024
OS/Arch:      linux/arm64

This is useful when reporting issues to be able to know which specific version is failing (I know nmc is perfect and it would never fail but just in case :) )

More info https://www.reddit.com/r/rust/comments/y0gxa0/compiling_version_information_into_rust_binary/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant