Documentation
¶
Index ¶
- func AuthWxCode(code string) (rs *response.ResponseCode2Session, err error)
- func Base64Decode(str string) string
- func Base64Encode(str string) string
- func ContainsAny(str string, substrs []string) bool
- func CreateFile(path string) error
- func FileExist(path string) bool
- func Hash(str string) string
- func InSlice(slice []string, value string) int
- func ListToMap(list interface{}, key string) map[string]interface{}
- func Mkdir(path string) error
- func NumberFormat[T ~float32 | ~float64](f T, n ...uint) float64
- func ReadyFile(fileExt ...string) (string, string)
- func SpreadPeriodToHour[T timeNumber](start, end T) []T
- func TimeFormat[T timeNumber](t T) string
- func Union[T string | Number](slice1, slice2 []T) []T
- func UnixGroup(times []int) [][]int
- func WxCheckContent(openID, content string) (err error)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthWxCode ¶
func AuthWxCode(code string) (rs *response.ResponseCode2Session, err error)
用Code向微信官方换取openid等信息 该函数可能会运行较慢
func Base64Decode ¶
func Base64Encode ¶
func ContainsAny ¶ added in v1.3.3
判断一个字符串是否包含多个子字符串中的任意一个
func SpreadPeriodToHour ¶
func SpreadPeriodToHour[T timeNumber](start, end T) []T
打散时间段(粒度为1小时) ; 如: "1-4点" 转为 ["1点", "2点", "3点"] 三个时间段
func TimeFormat ¶
func TimeFormat[T timeNumber](t T) string
func WxCheckContent ¶ added in v1.0.2
检查内容是否合法
Types ¶
Click to show internal directories.
Click to hide internal directories.