Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomOutput func(wOut io.Writer, wErr io.Writer) Notice = func(wOut io.Writer, wErr io.Writer) Notice { return func(message interface{}, statusCode int, progs ...*notice.Progress) error { if len(progs) > 0 && progs[0] != nil { message = `[ ` + tplfunc.NumberFormat(progs[0].CalcPercent().Percent, 2) + `% ] ` + fmt.Sprint(message) } if statusCode > 0 { fmt.Fprintln(wOut, message) } else { fmt.Fprintln(wErr, message) } return nil } }
Functions ¶
This section is empty.
Types ¶
type Notice ¶
var Default Notice = func(message interface{}, statusCode int, progs ...*notice.Progress) error { if len(progs) > 0 && progs[0] != nil { message = `[ ` + tplfunc.NumberFormat(progs[0].CalcPercent().Percent, 2) + `% ] ` + fmt.Sprint(message) } if statusCode > 0 { log.Info(message) } else { log.Error(message) } return nil }
Click to show internal directories.
Click to hide internal directories.