From 72fc21d797a58b78a674190cf65f6238c949b570 Mon Sep 17 00:00:00 2001 From: Nick Miyake Date: Tue, 21 Nov 2017 14:40:01 -0800 Subject: [PATCH] Export version variable (#85) --- cobracli/default.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobracli/default.go b/cobracli/default.go index 6e4b6abb..c90ed0ab 100644 --- a/cobracli/default.go +++ b/cobracli/default.go @@ -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