Skip to content

Commit

Permalink
feat(output): set default global output
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Mar 3, 2023
1 parent 3231580 commit 2f39c0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions output.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func DefaultOutput() *Output {
return output
}

// SetDefaultOutput sets the default global output.
func SetDefaultOutput(o *Output) {
output = o
}

// NewOutput returns a new Output for the given file descriptor.
func NewOutput(tty io.Writer, opts ...OutputOption) *Output {
o := &Output{
Expand Down

0 comments on commit 2f39c0a

Please sign in to comment.