Documentation ¶
Index ¶
- func AppName() string
- func ClientAddr(ctx *fasthttp.RequestCtx) string
- func ClientIP(ctx *fasthttp.RequestCtx) (string, int)
- func Error(errCode int, msg string, data any) (res *types.Result)
- func ErrorResponse(ctx *fasthttp.RequestCtx, errCode int, msg string, data any)
- func GetEnvDefault(key, defVal string) string
- func GetIPs() (ips []string)
- func GetMacAddrs() (macAddrs []string)
- func JsonDecode(str string, v any) error
- func MD5(v string) string
- func MapToStruc[_type interface{ ... }](m map[_type]any, s any) (err error)
- func RangeRand(min, max int) int
- func RunFuncName() string
- func RunPackageName() string
- func SnakeString(s string) string
- func Success(msg string, data any) (res *types.Result)
- func Time() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(ctx *fasthttp.RequestCtx, errCode int, msg string, data any)
响应错误数据
func MapToStruc ¶
map转struc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.