better error handling

This commit is contained in:
2024-12-19 10:55:39 +01:00
parent 1b9ec48396
commit 97837076a3
6 changed files with 29 additions and 29 deletions

View File

@@ -32,7 +32,7 @@ func List(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {
func ListJson(writer io.Writer, conf *cfg.Config, entries app.DbEntries) error {
jsonentries, err := json.Marshal(entries)
if err != nil {
return fmt.Errorf("json marshalling failure: %s", err)
return fmt.Errorf("failed marshall json: %s", err)
}
fmt.Println(string(jsonentries))