Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/ctxutil/ctxutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import "context"
// pattern at call sites.
func OrBackground(ctx context.Context) context.Context {
if ctx == nil {
return context.Background()
// The parameter is nil here, so falling back to a fresh background
// context is the intended behavior of this helper.
return context.Background() //nolint:ctxbackground
}
return ctx
}
Loading