Correct fprintf confusion
This commit is contained in:
parent
aa0703da01
commit
2b5c6f1c73
2 changed files with 4 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ func displayStructuredJSON() {
|
|||
enc := json.NewEncoder(os.Stdout)
|
||||
enc.SetIndent("", " ")
|
||||
if err := enc.Encode(displayStructures); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "failed to encode as JSON: %v\n", aura.Red(err))
|
||||
fmt.Fprintf(os.Stderr, "failed to encode as JSON: %v\n", aura.Red(err))
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ func displayStructuredYAML() {
|
|||
enc := yaml.NewEncoder(os.Stdout)
|
||||
enc.SetIndent(2)
|
||||
if err := enc.Encode(displayStructures); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "failed to encode as YAML: %v\n", aura.Red(err))
|
||||
fmt.Fprintf(os.Stderr, "failed to encode as YAML: %v\n", aura.Red(err))
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue