Added version print by --version flag

This commit is contained in:
ErickSkrauch
2018-01-24 01:39:40 +03:00
parent dcaa4c037d
commit caebac1753
3 changed files with 9 additions and 5 deletions

4
Gopkg.lock generated
View File

@@ -143,7 +143,7 @@
branch = "master" branch = "master"
name = "github.com/spf13/cobra" name = "github.com/spf13/cobra"
packages = ["."] packages = ["."]
revision = "3c0b56b677e04926dfa835a1b3f11cd4f62f076e" revision = "0c34d16c3123764e413b9ed982ada58b1c3d53ea"
[[projects]] [[projects]]
branch = "master" branch = "master"
@@ -203,6 +203,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "b85cbbca8b4283a0977ee92789c9beee468f2d355da5dfa28a4176934548f6f3" inputs-digest = "85c318cc67a4e78dd3608297ae189cc70b07968ba6e0e1a04cc21b264fddf1eb"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@@ -12,6 +12,7 @@ ignored = ["elyby/minecraft-skinsystem"]
[[constraint]] [[constraint]]
name = "github.com/spf13/cobra" name = "github.com/spf13/cobra"
branch = "master"
[[constraint]] [[constraint]]
name = "github.com/spf13/viper" name = "github.com/spf13/viper"

View File

@@ -4,6 +4,8 @@ import (
"fmt" "fmt"
"os" "os"
"elyby/minecraft-skinsystem/bootstrap"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
@@ -13,6 +15,7 @@ var cfgFile string
var RootCmd = &cobra.Command{ var RootCmd = &cobra.Command{
Use: "", Use: "",
Short: "Nothing here", Short: "Nothing here",
Version: bootstrap.GetVersion(),
} }
// Execute adds all child commands to the root command and sets flags appropriately. // Execute adds all child commands to the root command and sets flags appropriately.