MCPcopy Create free account
hub / github.com/auth0/auth0-cli / contextWithCancel

Function contextWithCancel

internal/cli/root.go:200–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198}
199
200func contextWithCancel() context.Context {
201 ctx, cancel := context.WithCancel(context.Background())
202
203 ch := make(chan os.Signal, 1)
204 signal.Notify(ch, os.Interrupt)
205
206 go func() {
207 <-ch
208 defer cancel()
209 os.Exit(0)
210 }()
211
212 return ctx
213}
214
215func overrideHelpAndVersionFlagText(cmd *cobra.Command) {
216 cmd.Flags().BoolP("version", "v", false, "Version for auth0.")

Callers 1

ExecuteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected