sender

package
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notice

type Notice func(message interface{}, statusCode int, progress ...*notice.Progress) error
var Default Notice = func(message interface{}, statusCode int, progs ...*notice.Progress) error {
	if len(progs) > 0 && progs[0] != nil {
		message = `[ ` + tplfunc.NumberFormat(progs[0].Percent, 2) + `% ] ` + echo.Dump(message, false)
	}
	if statusCode > 0 {
		log.Info(message)
	} else {
		log.Error(message)
	}
	return nil
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL