atc0005 / go-nagios

Shared Golang package for Nagios plugins
MIT License
8 stars 3 forks source link

Add support for setting preferred output target #145

Closed atc0005 closed 2 years ago

atc0005 commented 2 years ago

Add ExitState.SetOutputTarget method to provide client code the ability to override the destination output sink. This could be used to redirect output to a file, a tee writer or an in-memory buffer for test purposes.

Default to os.Stdout if user does not specify a custom output sink.

fixes GH-140