You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, The version of the cmd tool is set using an additional function which can be seen here.
The Cobra Library already has a feature to set the version using the underlying struct field Version.
// Version defines the version for this command. If this value is non-empty and the command does not
// define a "version" flag, a "version" boolean flag will be added to the command and, if specified,
// will print content of the "Version" variable. A shorthand "v" flag will also be added if the
// command does not define one.
Currently, The version of the cmd tool is set using an additional function which can be seen here.
The Cobra Library already has a feature to set the version using the underlying struct field
Version
.Official docs: https://github.com/spf13/cobra/blob/5cdf8e26ba7046dd743463f60102ab52602c6428/command.go#L90
My proposal to improve it :
I have already tested it and working as expected. Please check the output below:
The text was updated successfully, but these errors were encountered: