utils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillURLWithMap

func FillURLWithMap(urlStr string, data map[string]interface{}) string

将map中的各个参数填充到url中

func FillURLWithStruct added in v0.1.5

func FillURLWithStruct(urlStr string, s interface{}, flag int) string

将结构体中的各个参数填充到url中 flag: 0 默认,1 表示将字段名转换为小写

func GenerateRandomString added in v0.0.8

func GenerateRandomString(length int) (string, error)

生成指定长度的随机字符串 length 长度

func GenerateStrMD5 added in v0.0.9

func GenerateStrMD5(input string) string

计算字符串的 MD5 哈希值并返回十六进制字符串

func RandomSleep

func RandomSleep(minSeconds, maxSeconds int)

在两个整数中间随机随眠若干秒

Types

This section is empty.

Jump to

Keyboard shortcuts

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