fn: add comment to context create fn

This commit is contained in:
ziggie
2025-06-03 17:28:40 +02:00
parent fe3a862ec3
commit af47604cc3

View File

@@ -127,6 +127,10 @@ func WithTimeoutCG() ContextGuardOption {
// Create is used to derive a cancellable context from the parent. Various
// options can be provided to configure the behaviour of the derived context.
//
// NOTE: When creating a new context make sure that either the global context
// is quit or the returned cancel function is called to remove the cancel
// function form the internal map of the context guard so avoid a memory leak.
func (g *ContextGuard) Create(ctx context.Context,
options ...ContextGuardOption) (context.Context, context.CancelFunc) {