ctxjoin A library to join contexts in various manners. func doSomething() { ctx, cancel := ctxjoin.AddCancel(ctx, someExtraCancelableContext) defer cancel() // ... }