helper

package module
v0.0.0-...-bb57830 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteIndex

func ByteIndex(arr []byte, s byte) int

获取byte中某个字符的索引

func ByteJoin

func ByteJoin(b ...[]byte) []byte

拼接byte

func GetConfig

func GetConfig(path string) (map[string]string, error)

读取key=value类型的配置文件

func Json

func Json(data interface{}) string

func Md5

func Md5(str string) string

生成md5

func Nullf

func Nullf(d interface{})

空函数

func Print

func Print(data interface{})

打印数据

func RandomString

func RandomString(length int) string

随机字符串

func ReadFile

func ReadFile(fileName string) ([]byte, error)

读取文件

func Sleep

func Sleep(m time.Duration)

延迟毫秒

func Time

func Time() int64

获取时间戳 单位微秒

func WriteFile

func WriteFile(fileName string, data []byte) error

写入文件

func WriteFileAppend

func WriteFileAppend(fileName string, data []byte) error

追加写入文件

Types

This section is empty.

Jump to

Keyboard shortcuts

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