Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BuildVersion is the build version set by goreleaser BuildVersion = "" // BuildCommit is the git hash of the build. It is set by goreleaser BuildCommit = "" // BuildDate is the date the build was created. Its is set by goreleaser BuildDate = "" // GoVersion is the version of go used to build the client GoVersion = "" )
View Source
var RootCmd = &cobra.Command{ Use: config.AppName, Short: "Kit is the official client for the MakeOS network", Long: ``, PersistentPreRun: func(cmd *cobra.Command, args []string) { setVersionInfo() preRunIgnoreList := []string{cmd.Root().Name()} if !funk.ContainsString(preRunIgnoreList, cmd.CalledAs()) { preRun(cmd) } }, Run: func(cmd *cobra.Command, args []string) { version, _ := cmd.Flags().GetBool("version") if version { fmt.Println("Client:", BuildVersion) fmt.Println("Build:", BuildCommit) fmt.Println("Go:", GoVersion) if cfg.G().NodeKey != nil { fmt.Println("NodeID:", cfg.G().NodeKey.ID()) } return } _ = cmd.Help() }, }
RootCmd represents the base command when called without any sub-commands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.