utils

package
v0.0.0-...-56f3d1a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeId

func DecodeId(str string) []byte

decode string id to bytes

func F

func F(b []byte) string

Print byte slice data as hex string

func FileIsExist

func FileIsExist(name string) bool

FileExists reports whether the named file or directory exists.

func GenLogId

func GenLogId() string

Generate log id, Not strictly unique But the probability of repetition is very low Run unit test verification

func GenNonce

func GenNonce() string

func GenPseudoUniqId

func GenPseudoUniqId() uint64

Generate unique id, Not strictly unique But the probability of repetition is very low Run unit test verification

func GetCurExecDir

func GetCurExecDir() string

获取当前执行目录

func GetCurFileDir

func GetCurFileDir() string

获取当前源文件目录

func GetFuncCall

func GetFuncCall(callDepth int) (string, string)

Get call method by runtime.Caller

func GetHostName

func GetHostName() string

func PathExists

func PathExists(path string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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