Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-05 00:56:01 +01:00
parent a28e1cb7a0
commit 4d11b5354c
5 changed files with 33 additions and 25 deletions

View file

@ -27,11 +27,11 @@ If -j or --json is added, the results will be in JSON format.`,
zets := zet.SearchZets(args[0])
zetList := zet.CreateZetList(zets)
result := zetList.Parse()
if jsonOutput {
zetList := zet.CreateZetList(zets, false)
result := zetList.Parse()
json, err := json.AsJSON(result)
if err != nil {
@ -40,6 +40,10 @@ If -j or --json is added, the results will be in JSON format.`,
fmt.Println(json)
} else {
zetList := zet.CreateZetList(zets)
result := zetList.Parse()
fmt.Println(strings.Join(result, "\n"))
}
},