gitee.com/quant1x/engine@v1.8.4/command/command_conf.go (about) 1 package command 2 3 import ( 4 "fmt" 5 "gitee.com/quant1x/engine/config" 6 "gitee.com/quant1x/gox/api" 7 "gitee.com/quant1x/pkg/yaml" 8 cmder "github.com/spf13/cobra" 9 ) 10 11 // CmdConfig 显示配置信息 12 var CmdConfig = &cmder.Command{ 13 Use: "config", 14 Short: "显示配置信息", 15 Run: func(cmd *cmder.Command, args []string) { 16 data, err := yaml.Marshal(config.GlobalConfig) 17 if err != nil { 18 fmt.Println(err) 19 } else { 20 fmt.Println(api.Bytes2String(data)) 21 } 22 }, 23 }