mirror of
https://gitlab.durp.info/durfy/apps/durpcli.git
synced 2026-05-07 07:50:35 -05:00
updates
This commit is contained in:
parent
35a9be3738
commit
f13224733f
6 changed files with 64 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue