Documentation
¶
Index ¶
- func BuildSign(params map[string]interface{}, secretKey string) string
- func CheckSign(params map[string]interface{}, secretKey string) bool
- func ConvertTimeByTimezone(timeStr string, targetLocation *time.Location) (string, error)
- func MD5String(plaintext string) string
- func Masked(s string, maskedStr string) string
- func ParseFile(filePath string, resPtr interface{}) (err error)
- func ParseOffsetToLocation(targetZone string) (*time.Location, error)
- func RandFloat64() float64
- func RandIntN(n int) int
- func RandIntStr(n int) string
- func RandStr(n int) string
- func RemoveDuplicates[T comparable](list []T) []T
- func RootPath() string
- func SHA265String(plaintext string) string
- func ShowDurationString(duration time.Duration) string
- func Shuffle[T any](list []T)
- func TimeCostLog(ctx context.Context, logField string) func()
- func ToString(val any) string
- func UniqueID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertTimeByTimezone ¶ added in v2.1.32
ConvertTimeByTimezone timeStr 支持格式 time.RFC3339 / ISO 8601 targetTZ 支持格式 GMT+08:00 / UTC+08:00
func ParseOffsetToLocation ¶ added in v2.1.32
ParseOffsetToLocation targetTZ 支持格式 GMT+08:00 / UTC+08:00
func RandFloat64 ¶
func RandFloat64() float64
func RandIntStr ¶
func RemoveDuplicates ¶ added in v2.1.25
func RemoveDuplicates[T comparable](list []T) []T
func SHA265String ¶ added in v2.0.3
func ShowDurationString ¶
func TimeCostLog ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.