Skip to content
Myr

Fix Command.Context comment (#1639)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Paul Meyer · committed by GitHub · parent f848943 · Browse files · 1 file+8 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−3 removed

  • other:+8 added−3 removed

1 file+8 added−3 removed

modified:command.go+8 added-3 removed
164 unmodified lines
165 outWriter io.Writer166 // errWriter is a writer defined by the user that replaces stderr167 errWriter io.Writer168169 //FParseErrWhitelist flag parse errors to be ignored169 // FParseErrWhitelist flag parse errors to be ignored170 FParseErrWhitelist FParseErrWhitelist171172 // CompletionOptions is a set of options to control the handling of shell completion173 CompletionOptions CompletionOptions
49 unmodified lines
223 // Must be > 0.224 SuggestionsMinimumDistance int225}226227// Context returns underlying command context. If command wasn't228// executed with ExecuteContext Context returns Background context.227// Context returns underlying command context. If command was executed228// with ExecuteContext or the context was set with SetContext, the229// previously set context will be returned. Otherwise, nil is returned.230//231// Notice that a call to Execute and ExecuteC will replace a nil context of232// a command with a context.Background, so a background context will be233// returned by Context after one of these functions has been called.234func (c *Command) Context() context.Context {235 return c.ctx236}237
1454 unmodified lines