Documentation ¶
Index ¶
- func Assert(err error)
- func CatchPanic(aCallBackFunc func(args ...interface{}), args ...interface{})
- func FileExist(filename string) bool
- func FileRead(path string) ([]byte, error)
- func FileReadByLine(path string, deal func(line []byte) error) error
- func FileWrite(path string, data []byte) error
- func InternalIp() string
- func JoinPaths(absolutePath, relativePath string) string
- func Pid() int
- func ProcessName() string
- func VersionCompare(v1, v2 string) int
- type Random
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatchPanic ¶
func CatchPanic(aCallBackFunc func(args ...interface{}), args ...interface{})
捕获panic转为log输出, 建议加入有可能panic的函数中,用defer方式调用 aCallBackFunc 为回调函数, 如果调用方需要处理panic后事宜, 需要传入,不需要则传nil args为回调函数参数
func FileReadByLine ¶
ReadFileOneLine 逐行读取文件 通过deal处理
func ProcessName ¶
func ProcessName() string
func VersionCompare ¶
VersionCompare for compare v1 and v2. =0, <-1, >1, 非法-2
Types ¶
Click to show internal directories.
Click to hide internal directories.