2024-09-02 09:21:10 +00:00
|
|
|
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) {
|
2024-09-12 22:16:14 +00:00
|
|
|
proxy.Debug(cfgFile)
|
2024-09-02 09:21:10 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|