package cmd import ( "fmt" "os" "github.com/spf13/cobra" ) var ( Log string ) var rootCmd = &cobra.Command{ Use: "bgbench", Short: "Bit Goblin hardware benching tool.", Long: `A PC hardware benchmarking tool written by Bit Goblin.`, Version: "v0.3.0", } func Execute() { if err := rootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } func init() { rootCmd.PersistentFlags().StringVarP(&Log, "log", "l", "false", "File location to write results to.") }