Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "gossti", Short: "A CLI for gossti", PersistentPreRun: func(cmd *cobra.Command, args []string) { cliFlag, _ := cmd.Flags().GetCount("verbose") switch cliFlag { case 1: log.SetLevel(log.InfoLevel) log.Info("Log level set to INFO") case 2: log.SetLevel(log.DebugLevel) log.Info("Log level set to DEBUG") case 3: log.SetLevel(log.TraceLevel) log.Info("Log level set to TRACE") default: log.SetOutput(io.Discard) } }, }
rootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.