fix: print json

This commit is contained in:
liruichen 2023-09-11 16:25:08 +08:00
parent 8e4acada74
commit f964e7fa89

View File

@ -79,10 +79,11 @@ asJson:
} }
if !isJson { if !isJson {
table.Render() table.Render()
} } else {
b, _ := json.Marshal(agents) b, _ := json.Marshal(agents)
fmt.Fprint(os.Stdout, string(b)) fmt.Fprint(os.Stdout, string(b))
} }
}
func DeleteAgents(host string, ids []string) { func DeleteAgents(host string, ids []string) {
gocClient := rest.NewV2Client(host) gocClient := rest.NewV2Client(host)