mirror of
https://github.com/elyby/chrly.git
synced 2024-11-23 05:33:18 +05:30
Added version print by --version flag
This commit is contained in:
parent
dcaa4c037d
commit
caebac1753
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -143,7 +143,7 @@
|
||||
branch = "master"
|
||||
name = "github.com/spf13/cobra"
|
||||
packages = ["."]
|
||||
revision = "3c0b56b677e04926dfa835a1b3f11cd4f62f076e"
|
||||
revision = "0c34d16c3123764e413b9ed982ada58b1c3d53ea"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
@ -203,6 +203,6 @@
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "b85cbbca8b4283a0977ee92789c9beee468f2d355da5dfa28a4176934548f6f3"
|
||||
inputs-digest = "85c318cc67a4e78dd3608297ae189cc70b07968ba6e0e1a04cc21b264fddf1eb"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
@ -12,6 +12,7 @@ ignored = ["elyby/minecraft-skinsystem"]
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/spf13/cobra"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/spf13/viper"
|
||||
|
@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"elyby/minecraft-skinsystem/bootstrap"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
@ -11,8 +13,9 @@ import (
|
||||
var cfgFile string
|
||||
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "",
|
||||
Short: "Nothing here",
|
||||
Use: "",
|
||||
Short: "Nothing here",
|
||||
Version: bootstrap.GetVersion(),
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
@ -24,7 +27,7 @@ func Execute() {
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
func init() {
|
||||
cobra.OnInitialize(initConfig)
|
||||
RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.test.yaml)")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user