Documentation ¶
Index ¶
- func Bytes2str(b []byte) (s string)
- func BytesToInt(b []byte) int
- func Int64ToString(i int64) string
- func IntToBytes(n int) []byte
- func IntToString(i int) string
- func JsonToMap(body []byte) (*map[string]interface{}, error)
- func JsonToMapByInt(body []byte, dst *map[string]interface{}) error
- func JsonToMapUseInt64(body []byte, dst *map[string]interface{}) error
- func JsonToMapUseNumber(body []byte, dst *map[string]interface{}) error
- func JsonToStruct(jsStr string, st interface{}) error
- func MapToJson(hashmap interface{}) string
- func Str2bytes(s string) (b []byte)
- func StrToInt(num string) int
- func StrToInt32(num string) int32
- func StructToJson(st interface{}) []byte
- func StructToJsonStr(st interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToInt ¶
func Int64ToString ¶
func IntToBytes ¶
func IntToString ¶
func JsonToMap ¶
* * @Description: use https://github.com/bytedance/sonic library to json Decode * @param: body * @return: *map[string]interface{} * @return: error * @Author: Iori *
func JsonToMapByInt ¶
* * @Description: json 转 map interface , 数值为int64版本 * @param: jsStr * @return: map[string]interface{} * @return: error * @Author: Iori *
func JsonToMapUseInt64 ¶
* * @Description: json 转 map interface , 数值使用https://github.com/bytedance/sonic int64版本 * @param: body * @param: dst * @return: error * @Author: Iori *
func JsonToMapUseNumber ¶
* * @Description: json 转 map interface , 数值使用https://github.com/bytedance/sonic number 版本 * @param: body * @param: dst * @return: error * @Author: Iori *
func JsonToStruct ¶
* * @Description: json to st use https://github.com/bytedance/sonic library * @param: jsStr * @param: st * @return: error * @Author: Iori *
func MapToJson ¶
func MapToJson(hashmap interface{}) string
* * @Description: use https://github.com/bytedance/sonic library to json Encode * @param: hashmap * @return: string * @Author: Iori *
func StrToInt32 ¶
func StructToJson ¶
func StructToJson(st interface{}) []byte
* * @Description: st to json use https://github.com/bytedance/sonic library * @param: st_ * @return: []byte *
func StructToJsonStr ¶
func StructToJsonStr(st interface{}) string
* * @Description: st to json str use https://github.com/bytedance/sonic library * @param: st * @return: string *
Types ¶
This section is empty.