This commit is contained in:
2023-02-19 18:53:48 -06:00
parent 35a9be3738
commit f13224733f
6 changed files with 64 additions and 17 deletions

View File

@@ -18,7 +18,7 @@ var cfgFile string
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "toolbox",
Use: "GoCLI",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:
@@ -49,10 +49,15 @@ func init() {
setDefaults()
fmt.Println("name:", viper.Get("name"))
err := viper.WriteConfigAs("GoCLI.backup.yaml")
if err != nil {
fmt.Println(err)
}
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.
// Add my subcommand palette
rootCmd.AddCommand(info.InfoCmd)
rootCmd.AddCommand(net.NetCmd)