utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Log is global logger
	Log *zap.Logger
)

Functions

func AnyToStruct added in v0.1.0

func AnyToStruct(from interface{}, to interface{}) error

AnyToStruct use to bind map, interface, struct to the other type

func InitLogger

func InitLogger(lvl int, timeFormat string) error

InitLogger initializes log by input parameters lvl - global log level: Debug(-1), Info(0), Warn(1), Error(2), DPanic(3), Panic(4), Fatal(5) timeFormat - custom time format for logger of empty string to use default

Types

type Logger added in v0.1.0

type Logger *zap.Logger

Logger ...

Jump to

Keyboard shortcuts

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