util

package
v0.0.0-...-7c1f5ed Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerEncoder

func CallerEncoder(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder)

CallerEncoder for logging caller format

func GenerateFilePath

func GenerateFilePath(dir, filename, ext string) (string, error)

GenerateFilePath ...

func InitLog

func InitLog(name string) (log *zap.SugaredLogger, err error)

InitLog returns logger instance.

func NewID

func NewID() (id string)

NewID : make Uniq ID

func RandNum

func RandNum(max int) int

RandNum ...

func RandString

func RandString(n int) string

RandString : make Random String

func TimeEncoder

func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

TimeEncoder for logging time format

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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