Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigCmd = &cobra.Command{ Use: "config", Short: "Manage configuration", Run: func(cmd *cobra.Command, args []string) { isCopyConfigFile, err := cmd.Flags().GetBool("copy") if err != nil { fmt.Printf("Error: %v\n", err) os.Exit(1) } if isCopyConfigFile { if err := CopyDefaultConfigFile(); err == nil { fmt.Println("Copy the default config file to the local config directory successfully.") } else { fmt.Printf("Error: %v\n", err) } } }, }
ConfigCmd represents the config command
Functions ¶
func CopyDefaultConfigFile ¶
func CopyDefaultConfigFile() error
CopyDefaultConfigFile copies the default configuration file to the user's home directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.