You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the purpose of creating two contexts (first with context.WithCancel, then with metadata.NewOutgoingContext)? To me it looks like the first one is simply redundant and the code can be simplified to:
// Copy the inbound metadata explicitly.
outCtx := metadata.NewOutgoingContext(ctx, md.Copy())
The text was updated successfully, but these errors were encountered:
go vet
warns about ignoring the cancel function returned by context.WithCancel():https://stackoverflow.com/questions/44393995/what-happens-if-i-dont-cancel-a-context explains that this leads to a resource leak.
What is the purpose of creating two contexts (first with context.WithCancel, then with metadata.NewOutgoingContext)? To me it looks like the first one is simply redundant and the code can be simplified to:
The text was updated successfully, but these errors were encountered: