Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Data is the customized logrus log used for stdout output. // Use this for data that can be piped to other applications. Data = log.New() // User is the customized logrus log used for stderr output. User = log.New() // UserFormatter is the formatter used for User output UserFormatter = new(PlainFormatter) )
Functions ¶
func PrettyString ¶
func PrettyString(str string)
Types ¶
type FlairedData ¶
type FlairedData struct {
// contains filtered or unexported fields
}
FlairedData is a struct that can be used to print data with surrounding flair.
func DataWithFlair ¶
func DataWithFlair(data string) *FlairedData
DataWithFlair Prints only the data to stdout so it can be piped to other commands without including the surrounding text. Use Pre() and Post() methods to add surrounding text that will be displayed to the user but will not be included in the piped output.
func (*FlairedData) Post ¶
func (f *FlairedData) Post(flair string) *FlairedData
Post sets the flair to be printed after the data.
func (*FlairedData) Pre ¶
func (f *FlairedData) Pre(flair string) *FlairedData
Pre sets the flair to be printed before the data.
func (*FlairedData) Println ¶
func (f *FlairedData) Println()
Println will output the flaired message followed by a line break
type PlainFormatter ¶
type PlainFormatter struct{}
PlainFormatter defines a output formatter with no special frills
Click to show internal directories.
Click to hide internal directories.