Compare commits

...

1 Commits

Author SHA1 Message Date
010bb24581 dev 2024-07-17 15:18:28 +08:00

View File

@ -152,8 +152,13 @@ func (p *program) Start() error {
cfg := config.Global()
if showConfig {
marshal, _ := yaml.Marshal(cfg)
fmt.Println(string(marshal))
if outputFormat == "json" {
marshal, _ := json.Marshal(cfg)
fmt.Println(string(marshal))
} else {
marshal, _ := yaml.Marshal(cfg)
fmt.Println(string(marshal))
}
os.Exit(0)
return nil
}