tools

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomTimeEncoder

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

CustomTimeEncoder 自定义日志输出时间格式

func ParseFloat2F

func ParseFloat2F(value float64) float64

func ParseStringToInt64

func ParseStringToInt64(value string) int64

func Viper

func Viper(path ...string) *viper.Viper

func Zap

func Zap() (logger *zap.Logger)

Types

type RunTask

type RunTask interface {
	AddTask()
	RunTask()
}

type T

type T struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewT

func NewT() *T

func (*T) AddTask

func (t *T) AddTask()

func (*T) DefaultF

func (t *T) DefaultF(ch chan struct{}) error

func (*T) RunTask

func (t *T) RunTask()

type Watch

type Watch struct {
	*fsnotify.Watcher
}

func NewWatch

func NewWatch() *Watch

func (*Watch) Watch

func (w *Watch) Watch(path string, t *T) error

Jump to

Keyboard shortcuts

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