Skip to content

fix(contrib/registry/discovery): replace context.TODO() with context.Background()#3786

Merged
tonybase merged 2 commits intogo-kratos:mainfrom
1911860538:discovery/context
Dec 31, 2025
Merged

fix(contrib/registry/discovery): replace context.TODO() with context.Background()#3786
tonybase merged 2 commits intogo-kratos:mainfrom
1911860538:discovery/context

Conversation

@1911860538
Copy link
Contributor

@1911860538 1911860538 commented Dec 29, 2025

Replace context.TODO() with context.Background() in discovery registry to follow Go best practices.
context.TODO() should only be used when it's unclear which context to use or as a temporary placeholder during development. In these cases, we need a proper root context, so context.Background() is the correct choice.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 29, 2025
@dosubot dosubot bot added the LGTM label Dec 31, 2025
@tonybase tonybase merged commit 8faeb28 into go-kratos:main Dec 31, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants