Documentation ¶
Index ¶
- func Bytes2String(b []byte) string
- func If[T any](condition bool, trueVal, falseVal T) T
- func NewTimeCache[T any](expire time.Duration, getter func() (T, error)) *timeCache[T]
- func Recover(msg string, goAfterRecover func(err error))
- func SplitBy(content, spliter, escape string) (ret []string)
- func SplitHead(content, spliter, escape string) (ret [2]string)
- func String2Bytes(s string) []byte
- func Try(invoke func())
- func TryCatch(invoke func(), fallback func(err error))
- type NoCopy
- type TimeCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bytes2String ¶ added in v0.0.12
func NewTimeCache ¶ added in v0.0.10
func SplitHead ¶ added in v0.0.12
使用分隔符与转义符对字符串进行分割(只拆分出第一个) $content 字符串内容 $spliter 分隔符 $escape 转义符
func String2Bytes ¶ added in v0.0.12
Types ¶
Click to show internal directories.
Click to hide internal directories.