mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-27 05:01:45 +00:00
30 lines
767 B
Go
30 lines
767 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/Baipyrus/ProxySwitcher/proxy"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// debugCmd represents the debug command
|
|
var debugCmd = &cobra.Command{
|
|
Use: "debug",
|
|
Short: "Output all parsed configurations for debugging",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
proxy.Debug()
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(debugCmd)
|
|
|
|
// Here you will define your flags and configuration settings.
|
|
|
|
// Cobra supports Persistent Flags which will work for this command
|
|
// and all subcommands, e.g.:
|
|
// debugCmd.PersistentFlags().String("foo", "", "A help for foo")
|
|
|
|
// Cobra supports local flags which will only run when this command
|
|
// is called directly, e.g.:
|
|
// debugCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
|
}
|