1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-11 17:27:17 +00:00

Clarify SetContext documentation ()

This commit is contained in:
Paul Meyer 2022-08-30 04:12:56 +02:00 committed by GitHub
parent 7045405250
commit 2a7647ff46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,8 +236,8 @@ func (c *Command) Context() context.Context {
return c.ctx
}
// SetContext sets context for the command. It is set to context.Background by default and will be overwritten by
// Command.ExecuteContext or Command.ExecuteContextC
// SetContext sets context for the command. This context will be overwritten by
// Command.ExecuteContext or Command.ExecuteContextC.
func (c *Command) SetContext(ctx context.Context) {
c.ctx = ctx
}