Documentation ¶
Overview ¶
Package output handles the output for Goophry. It provides routines to enable debug messages. Also output can be written to a logfile instead of printing it to stdout. Furthermore it provides the possibility to execute a command to notify an external script/application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
An Output provides routines to handle messages within Goophry.
func NewOutput ¶
func NewOutput() Output
NewOutput returns a new instance of Output, writing the messages to stdout per default.
func (Output) Debug ¶
Debug writes a message to the current output, when debugging output is enabled.
func (Output) NotifyError ¶
NotifyError executes the notify-command with a given message.
func (*Output) SetLogfile ¶
SetLogfile modifies the Output object to write messages to the given logfile instead of stdout. It may return an error, if something went wrong with opening the file.
func (*Output) SetNotifyCmd ¶
SetNotifyCmd sets the command used for notifying about certain messages.