utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MD5String added in v0.1.4

func MD5String(plaintext string) string

func Masked added in v0.1.4

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 added in v0.1.5

func ShowDurationString(duration time.Duration) string

func TimeCostLog added in v0.1.3

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

func UniqueID added in v0.1.5

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