diff --git a/cmd/restic/cmd_forget.go b/cmd/restic/cmd_forget.go index 8dabb7feb..7740a6e08 100644 --- a/cmd/restic/cmd_forget.go +++ b/cmd/restic/cmd_forget.go @@ -262,7 +262,7 @@ func runForget(ctx context.Context, opts ForgetOptions, pruneOptions PruneOption } var key data.SnapshotGroupKey - if json.Unmarshal([]byte(k), &key) != nil { + if err := json.Unmarshal([]byte(k), &key); err != nil { return err }