Skip to content

Commit

Permalink
go: Unify CLI tools' version display and also display Go version
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanez committed Sep 3, 2020
1 parent 43d9e8a commit 2946c02
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/3233.feature.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go: Unify CLI tools' version display and also display the Go toolchain version
2 changes: 2 additions & 0 deletions go/extra/stats/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func Execute() {
}

func init() {
common.SetBasicVersionTemplate(rootCmd)

logLevel := logging.LevelInfo
rootFlags.Var(&logLevel, cfgLogLevel, "log level")
_ = viper.BindPFlags(rootFlags)
Expand Down
2 changes: 2 additions & 0 deletions go/oasis-net-runner/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ func doDumpFixture(cmd *cobra.Command, args []string) {
}

func init() {
common.SetBasicVersionTemplate(rootCmd)

logFmt := logging.FmtLogfmt
logLevel := logging.LevelInfo

Expand Down
2 changes: 2 additions & 0 deletions go/oasis-remote-signer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ func runRoot(cmd *cobra.Command, args []string) error {
}

func init() {
cmdCommon.SetBasicVersionTemplate(rootCmd)

_ = viper.BindPFlags(cmdCommon.RootFlags)

rootFlags.String(cfgClientCertificate, "client_cert.pem", "client TLS certificate (REQUIRED)")
Expand Down
2 changes: 2 additions & 0 deletions go/oasis-test-runner/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ func runList(cmd *cobra.Command, args []string) {
}

func init() {
nodeCommon.SetBasicVersionTemplate(rootCmd)

logFmt := logging.FmtLogfmt
logLevel := logging.LevelWarn

Expand Down

0 comments on commit 2946c02

Please sign in to comment.