common

package
v0.0.0-...-8585d0b Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: LGPL-2.1 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Numbers = "0123456789"
)

Variables

View Source
var DefaultLoggerWriter io.Writer = NewLogWriter(logger.DefaultLogger)
View Source
var TAsiaShanghai = time.FixedZone("UTC+8", 8*3600)
View Source
var VHandle = template.FuncMap{
	"add": vAdd,
}

Functions

func InitConfig

func InitConfig(file, ext string, config interface{}) error

filepath ext

func InitLogger

func InitLogger(names ...LogOpt)

func NewLogWriter

func NewLogWriter(zapx *logger.ZapX) io.Writer

func RandomLetters

func RandomLetters(length int) string

func RandomNumbers

func RandomNumbers(length int) string

Types

type LogOpt

type LogOpt struct {
	Name    string
	Console bool
	Level   zapcore.Level
	Path    string
}

Jump to

Keyboard shortcuts

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