utils

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSign

func BuildSign(params map[string]interface{}, secretKey string) string

func CheckSign

func CheckSign(params map[string]interface{}, secretKey string) bool

func MD5String

func MD5String(plaintext string) string

func Masked

func Masked(s string, maskedStr string) string

func ParseJSONFile

func ParseJSONFile(path string, resPtr interface{}) (err error)

func RandFloat64

func RandFloat64() float64

func RandIntN

func RandIntN(n int) int

func RandIntStr

func RandIntStr(n int) string

func RandStr

func RandStr(n int) string

func RootPath

func RootPath() string

func ShowDurationString

func ShowDurationString(duration time.Duration) string

func TimeCostLog

func TimeCostLog(ctx context.Context, logField string) func()

func UniqueID

func UniqueID() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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