Add managed reporter output state
This commit is contained in:
10
identity.go
10
identity.go
@@ -27,6 +27,16 @@ type Streams struct {
|
||||
Err io.Writer
|
||||
}
|
||||
|
||||
func normalizeStreams(streams Streams) Streams {
|
||||
if streams.Out == nil {
|
||||
streams.Out = io.Discard
|
||||
}
|
||||
if streams.Err == nil {
|
||||
streams.Err = io.Discard
|
||||
}
|
||||
return streams
|
||||
}
|
||||
|
||||
// Invocation provides execution context and output streams to a command
|
||||
// handler. For command aliases, EnteredPath and CanonicalPath expose the route
|
||||
// the caller used and the selected canonical command path. Both omit the
|
||||
|
||||
Reference in New Issue
Block a user