Document invocation reporting contracts
This commit is contained in:
@@ -14,10 +14,11 @@ import (
|
||||
|
||||
// Execute parses and dispatches one invocation. args excludes the executable
|
||||
// name. Supplied values are converted before command input construction; help
|
||||
// does not construct caller inputs or run acquisition callbacks. CommandKit
|
||||
// writes diagnostics to streams.Err and leaves process exit to the caller. A
|
||||
// nil context returns an operational failure, and nil streams are replaced with
|
||||
// io.Discard.
|
||||
// does not construct caller inputs or run acquisition callbacks. It applies the
|
||||
// parsed reporting selection, finalizes invocation presentation, and returns
|
||||
// the resulting Outcome without exiting the process. Supplied streams remain
|
||||
// caller-owned; nil destinations are replaced with io.Discard. A nil context
|
||||
// returns an operational failure.
|
||||
func (a *App) Execute(ctx context.Context, args []string, streams Streams) Outcome {
|
||||
current := newExecution(a, ctx, streams)
|
||||
if a == nil {
|
||||
|
||||
Reference in New Issue
Block a user