Documentation ¶
Index ¶
- Variables
- func Bytes2String(b []byte) string
- func FormatDateTime(s string) (time.Time, error)
- func GobConv(src any, dst any) error
- func If[T any](condition bool, trueVal, falseVal T) T
- func JsonConv(src any, dst any) error
- func MapConv(src map[string]any, dst any) error
- 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 ToTimeHookFunc() mapstructure.DecodeHookFunc
- func Try(invoke func())
- func TryCatch(invoke func(), fallback func(err error))
- type NoCopy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DateTime = "2006-01-02 15:04:05" DateOnly = "2006-01-02" TimeOnly = "15:04:05" )
Functions ¶
func Bytes2String ¶ added in v0.0.12
func SplitHead ¶ added in v0.0.12
使用分隔符与转义符对字符串进行分割(只拆分出第一个) $content 字符串内容 $spliter 分隔符 $escape 转义符
func String2Bytes ¶ added in v0.0.12
func ToTimeHookFunc ¶ added in v0.0.13
func ToTimeHookFunc() mapstructure.DecodeHookFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.