util

package
v0.0.0-...-d098e83 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenMd5

func GenMd5(data []byte) (md5sum string)

GenMd5 生成md5

func GenYYYYMMDD

func GenYYYYMMDD(sec int64) (yyyymmdd int)

GenYYYYMMDD 获取yyyymmdd

func GetCurrentFuncName

func GetCurrentFuncName() (funcName string)

func GetCurrentPath

func GetCurrentPath() (currentPath string, err error)

TODO 注意:不支持 link/快捷方式

func HASH32

func HASH32(data []byte) uint32

HASH32

func HASH64

func HASH64(data []byte) uint64

HASH64

func IsDarwin

func IsDarwin() bool

IsDarwin darwin

func IsLinux

func IsLinux() bool

IsLinux linux

func IsLittleEndian

func IsLittleEndian() bool

func IsWindows

func IsWindows() bool

IsWindows win

func MD5File

func MD5File(pathFile string) (md5sum string, err error)

func MkdirAll

func MkdirAll(path string) (err error)

func OverWriteFile

func OverWriteFile(pathFile string, data []byte) (err error)

func PathFileExists

func PathFileExists(pathFile string) bool

func SaveJson

func SaveJson(v interface{}, dstPathFile string) (err error)

func UnmarshalJsonFile

func UnmarshalJsonFile(pathFile string, v interface{}) (err error)

func UnmarshalXmlFile

func UnmarshalXmlFile(pathFile string, v interface{}) (err error)

Types

type TimeMgr

type TimeMgr struct {
	Second      int64 //近似时间(秒),上一次调用Update更新的时间
	Millisecond int64 //近似时间(毫秒),上一次调用Update更新的时间
}

TimeMgr 时间管理器

func (*TimeMgr) Update

func (p *TimeMgr) Update()

Update 更新时间管理器中的,当前时间

Jump to

Keyboard shortcuts

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