Skip to content

Commit

Permalink
Export version variable (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmiyake authored Nov 21, 2017
1 parent 4a3dcb6 commit 72fc21d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cobracli/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"github.com/spf13/cobra"
)

var version = "unspecified"
var Version = "unspecified"

// ExecuteWithDefaultParams executes the provided root command using the parameters returned by DefaultParams. This
// function also adds a "version command that prints the value of the "version" variable of this package. The value of
// this version variable should be set using build flags. Typical usage is
// "os.Exit(cobracli.ExecuteWithDefaultParams(...))" in a main function.
func ExecuteWithDefaultParams(rootCmd *cobra.Command, debugVar *bool) int {
return ExecuteWithDefaultParamsWithVersion(rootCmd, debugVar, version)
return ExecuteWithDefaultParamsWithVersion(rootCmd, debugVar, Version)
}

// ExecuteWithDefaultParamsWithVersion executes the provided root command using the parameters returned by
Expand Down

0 comments on commit 72fc21d

Please sign in to comment.