mirror of
https://github.com/spf13/cobra
synced 2024-12-27 14:57:06 +00:00
Clarify SetContext documentation (#1748)
This commit is contained in:
parent
7045405250
commit
2a7647ff46
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue