Documentation ¶
Index ¶
- func Base64Decode(data string) []byte
- func Base64Encode(bytes []byte) string
- func BytesToInt32(bys []byte) int32
- func BytesToInt32Array(byteData []byte) []uint32
- func BytesToInt64(bys []byte) int64
- func BytesToUInt16(bys []byte) int
- func ClientIpFromFasthttp(ctx *fasthttp.RequestCtx) string
- func ConfusionArrayKey(arrayLen int) []int
- func DoZlibCompress(src []byte) []byte
- func DoZlibUnCompress(compressSrc []byte) []byte
- func GenRandomNumber(start int, end int, count int) []int
- func GenSalt() string
- func GenVerifyCode() string
- func Int32ToBytes(n int32) []byte
- func Int64ToBytes(n int64) []byte
- func JsonMarshal(data interface{}) []byte
- func JsonUnMarshal(data []byte, v interface{}) error
- func LocalIp() string
- func Md5(content string) string
- func MilliSec() int64
- func Rand(min int32, max int32) int32
- func RealRand(min, max int64) int64
- func RealRandInt(min, max int) int
- func RealRandInt32(min, max int32) int32
- func SameDay(stamp int64) bool
- func Sec() int64
- func Seed()
- func SerializeInt32ToStr(data []int32, sep string) string
- func SerializeInt64ToStr(data []int64, sep string) string
- func SerializeIntToStr(data []int, sep string) string
- func StringToFloat64(num string) float64
- func StringToInt(num string) (int, error)
- func StringToInt32(num string) (int32, error)
- func StringToInt64(num string) (int64, error)
- func StringToUint64(num string) (uint64, error)
- func TimeZero() int64
- func UInt16ToBytes(n int) []byte
- func UnSerializeStrToInt(data string, sep string) []int
- func UnSerializeStrToInt32(data string, sep string) []int32
- func UnSerializeStrToInt64(data string, sep string) []int64
- func WeekZero() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func BytesToInt32Array ¶
BytesToInt32Array bytes转为int32数组
func ClientIpFromFasthttp ¶
func ClientIpFromFasthttp(ctx *fasthttp.RequestCtx) string
func GenRandomNumber ¶
GenRandomNumber 生成count个start到end之间的随机数[start,end)
func GenVerifyCode ¶
func GenVerifyCode() string
func JsonMarshal ¶
func JsonMarshal(data interface{}) []byte
func JsonUnMarshal ¶
func RealRandInt ¶
func RealRandInt32 ¶
func SerializeInt32ToStr ¶
func SerializeInt64ToStr ¶
func SerializeIntToStr ¶
func StringToFloat64 ¶
func StringToInt ¶
func StringToInt32 ¶
func StringToInt64 ¶
func StringToUint64 ¶
func UnSerializeStrToInt ¶
func UnSerializeStrToInt32 ¶
func UnSerializeStrToInt64 ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.