[GODRIVER-2256] Replace production context.TODO() with context.Background() Created: 14/Dec/21  Updated: 28/Oct/23  Resolved: 12/Oct/23

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0

Type: Task Priority: Trivial - P5
Reporter: Benji Rewis (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

We occasionally use context.TODO() in non-example code. context.TODO() is functionally identical to context.Background() but semantically implies that we do not know what the context should be (as is the case with example code). This is not the case in production code, so we should replace usages of context.TODO() with context.Background() or a more appropriate context.

In single_result.go.

In topology.go.



 Comments   
Comment by Githook User [ 12/Oct/23 ]

Author:

{'name': 'Ramit Mittal', 'email': 'commitemailoframit@protonmail.com', 'username': 'ramitmittal'}

Message: GODRIVER-2256 Replace production context.TODO() with context.Backgrou… (#1417)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/fcacd776b555b3221dd5cbbbe016565bdf126097

Generated at Thu Feb 08 08:38:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.