utils

package
v0.0.0-...-3eddf0a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Linux   = "linux"
	Windows = "windows"
	Darwin  = "darwin"
)

OS types.

Variables

This section is empty.

Functions

func GetJSONStr

func GetJSONStr(key string, value interface{}) string

GetJSONStr 生成JSON字符串

func GetLogTimeStr

func GetLogTimeStr(log *common.OneLog) string

GetLogTimeStr 格式化日志时间

func GetOS

func GetOS() (os string)

GetOS get os type

func GetTime

func GetTime(nanoSec int64) time.Time

GetTime 获取时间

func IsExist

func IsExist(path string) (os.FileInfo, error)

IsExist is file or dir exists

func ThirdCallerInfo

func ThirdCallerInfo(log *common.OneLog)

ThirdCallerInfo third layout caller

Types

This section is empty.

Jump to

Keyboard shortcuts

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