util

package
v0.0.0-...-066db92 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decimal2Hex

func Decimal2Hex(n int64, bit int) string

10进制 -> 16进制

func DeepCopy

func DeepCopy(src, dst interface{})

深层拷贝, 效率高于gob流的方式

func ExtValid

func ExtValid(filePath string)

func FileExists

func FileExists(name string) bool

FileExists reports whether the named file or directory exists.

func GetGID

func GetGID() uint64

通过stack信息获取goroutine id

func Hmac256

func Hmac256(message string, secret string) string

func Identity

func Identity(card string) (ok bool, addr, birth, sex string)

func Md5

func Md5(data []byte) string

func RandInt

func RandInt(scope int) int

随机整数

func RandomStr

func RandomStr(length int) string

随机字符串

func RandomString

func RandomString(length int) string

随机字符串

func Sha1

func Sha1(data []byte) string

func Sha256

func Sha256(data []byte) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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