utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateEPaySign

func CalculateEPaySign(mapData map[string]string, secret string) string

func CheckEPaySign

func CheckEPaySign(mapData map[string]string, secret string, sign string) bool

func EmptyPtr

func EmptyPtr[T comparable](v T) *T

func GetAbsolutePath added in v1.0.1

func GetAbsolutePath(path string) string

func MD5

func MD5(str string) []byte

func MD5String

func MD5String(str string) string

func ParseEmptyPtr

func ParseEmptyPtr[T any](v *T) T

func Ptr

func Ptr[T any](v T) *T

func PtrString

func PtrString(v string) *string

func RandInt

func RandInt(min, max int) int

RandInt generates a random integer between min and max

func RandString

func RandString(n int) string

RandString generates a random string of length n

Types

This section is empty.

Jump to

Keyboard shortcuts

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