Skip to content

Commit

Permalink
fix: properly delete the item from the cached items slice
Browse files Browse the repository at this point in the history
Should fix nil reference errors.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
  • Loading branch information
Unix4ever committed Jun 12, 2024
1 parent 63ad5bd commit 6286340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/backend/runtime/cosi/cosi.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func WatchLegacy(ctx context.Context, st state.State, md resource.Metadata, out
}

if items != nil {
slices.Delete(items, index, index+1) //nolint:govet
items = slices.Delete(items, index, index+1)
}

channel.SendWithContext(ctx, out, responseFromResource(ev, r))
Expand Down

0 comments on commit 6286340

Please sign in to comment.