util

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: BSD-3-Clause Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IP = new(addr)

Functions

func BcryptHash added in v0.0.71

func BcryptHash(passwd string) (hash, salt string)

BcryptHash 明文加密

func BcryptVerify added in v0.0.71

func BcryptVerify(salt, hash, passwd string) bool

BcryptVerify 校验密文和明文

func GetCurrentAbPath

func GetCurrentAbPath() string

func GetCurrentAbPathByCaller

func GetCurrentAbPathByCaller() string

获取当前执行文件绝对路径(go run)

func GetCurrentAbPathByExecutable

func GetCurrentAbPathByExecutable() string

获取当前执行文件绝对路径

func RandNumber

func RandNumber(start, end int) func() int

RandNumber 指定范围的随机数

func RandSeqID

func RandSeqID(n int) func() string

RandSeqID 生成随机序列(包括:大小写字母、数字)

func Snowflake added in v0.0.6

func Snowflake(startTime time.Time, machineID uint16) *sonyflake.Sonyflake

func UUID

func UUID() string

UUID 不包含"-" 小写字母 + 数字

Types

This section is empty.

Jump to

Keyboard shortcuts

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