wrap errors correctly

This commit is contained in:
2026-07-07 09:34:36 +02:00
parent 24038e36f7
commit 2f77c27715
22 changed files with 95 additions and 94 deletions

View File

@@ -104,7 +104,7 @@ func (data *Table) PrintYAML() error {
body, err := yaml.Marshal(raw)
if err != nil {
return fmt.Errorf("failed to produce YAML output: %s", err)
return fmt.Errorf("failed to produce YAML output: %w", err)
}
fmt.Println(string(body))
@@ -117,7 +117,7 @@ func (data *Table) PrintJSON() error {
body, err := json.MarshalIndent(raw, "", " ")
if err != nil {
return fmt.Errorf("failed to produce JSON output: %s", err)
return fmt.Errorf("failed to produce JSON output: %w", err)
}
fmt.Println(string(body))