ProxySwitcher/cmd/debug.go

30 lines
774 B
Go
Raw Permalink Normal View History

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(cfgPath)
},
}
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")
}