mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
add headers when using raw output (#1087)
* add headers when output raw with cscli
This commit is contained in:
parent
4c306187a6
commit
01130a5e17
3 changed files with 9 additions and 4 deletions
|
@ -131,8 +131,12 @@ func ListItem(itemType string, args []string) {
|
|||
}
|
||||
fmt.Printf("%s", string(x))
|
||||
} else if csConfig.Cscli.Output == "raw" {
|
||||
fmt.Printf("name,status,version,description\n")
|
||||
for _, v := range hubStatus {
|
||||
fmt.Printf("%s %s\n", v["name"], v["description"])
|
||||
if v["local_version"] == "" {
|
||||
v["local_version"] = "n/a"
|
||||
}
|
||||
fmt.Printf("%s,%s,%s,%s\n", v["name"], v["status"], v["local_version"], v["description"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue