utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None = 1 << iota
	Exception
	Err
	Warning
	Info
	Record
	Debug
)

Variables

This section is empty.

Functions

func CalculateHash

func CalculateHash(r io.Reader) string

func FailOnError

func FailOnError(err error, message string)

func PanicOnError

func PanicOnError(err error, message string)

Types

type ILog

type ILog interface {
	Printf(p int, format string, a ...interface{})
	Println(p int, a ...interface{})
	Print(p int, a ...interface{})
	SetPriority(pri int)
	GetPriority() int
	SetOut(writer io.Writer)
}
var Log ILog

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLog

func NewLog() *Logger

func (*Logger) GetPriority

func (l *Logger) GetPriority() int

func (*Logger) Print

func (l *Logger) Print(p int, a ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(p int, format string, a ...interface{})

func (*Logger) Println

func (l *Logger) Println(p int, a ...interface{})

func (*Logger) SetOut

func (l *Logger) SetOut(writer io.Writer)

func (*Logger) SetPriority

func (l *Logger) SetPriority(pri int)

Jump to

Keyboard shortcuts

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