util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorToString

func ErrorToString(r interface{}) string

ErrorToString 把recover捕获的异常,转成错误字符串

func IsChinese

func IsChinese(r rune) bool

func IsEnglish

func IsEnglish(r rune) bool

func IsNumber

func IsNumber(r rune) bool

func KeySort

func KeySort(params map[string]string) string

KeySort 将map的键值按ASCII码排序

func Md5Lower

func Md5Lower(str string) string

Md5Lower MD5散列32位小写

func Md5Upper

func Md5Upper(str string) string

Md5Upper MD5散列32位大写

func RandInt

func RandInt(min int, max int) int64

RandInt 获取随机数

func RandMd5

func RandMd5() string

RandMd5 根据时间获取随机md5字符串

func RandSha1

func RandSha1() string

RandSha1 根据时间获取随机sha1字符串

func RandSha2

func RandSha2() string

RandSha2 根据时间获取随机sha2字符串

func RandStr

func RandStr(l int) string

RandStr 获取随机字符串

func Sha1

func Sha1(str string) string

Sha1 计算sha1值

func Sha2

func Sha2(str string) string

Sha2 计算sha2值

Types

type H

type H map[string]interface{}

type IncrTime

type IncrTime struct {
	// contains filtered or unexported fields
}

func NewIncrTime

func NewIncrTime(min, max time.Duration, multiplier float64) *IncrTime

func (*IncrTime) Duration

func (it *IncrTime) Duration() time.Duration

func (*IncrTime) Incr

func (it *IncrTime) Incr()

func (*IncrTime) Reset

func (it *IncrTime) Reset()

func (*IncrTime) Sleep

func (it *IncrTime) Sleep()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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