Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToString(b []byte) string
- func ConvToFloat64ByKey(data map[string]interface{}, keys ...string)
- func ConvToInt32ByKey(data map[string]interface{}, keys ...string)
- func ConvToInt64ByKey(data map[string]interface{}, keys ...string)
- func ConvToTimeByKey(data map[string]interface{}, local *time.Location, keys ...string)
- func FilterMapFieldNull(sdata map[string]interface{}) (ddata map[string]interface{})
- func GetHashcode(v interface{}) int32
- func GetPathValid(v ...string) (string, error)
- func GetStringCode(str string) int32
- func StrToTime(str string, local *time.Location) (time.Time, error)
- func StringToBytes(s string) (b []byte)
- func TransfMap2Struct(source map[string]interface{}, inStructPtr interface{}) error
- func TransfMap2StructNulltype(source map[string]interface{}, inStructPtr interface{}) error
- func TransfStruct2Map(obj interface{}, keys []string) map[string]interface{}
- type MapItem
- type MapSorter
Constants ¶
View Source
const ( //日期时间格式 FORMATDATETIME = "2006-01-02 15:04:05" //日期格式 FORMATDATE = "2006-01-02" //数据库时间格式 FORMATSQLTIME = "2006-01-02 15:04:05.999999999Z07:00" FORMATMSSQLTIME = "2006-01-02T15:04:05Z07:00" //日志时间格式 FORMATLOGTIME = "1月2日 15:04:05" )
Variables ¶
View Source
var TIMEZONE *time.Location
Functions ¶
func BytesToString ¶
BytesToString converts byte slice to string without a memory allocation.
func ConvToFloat64ByKey ¶
根据key转换map对象string值为float64值
func ConvToInt32ByKey ¶
根据key转换map对象string值为int值
func ConvToInt64ByKey ¶
根据key转换map对象string值为int64值
func ConvToTimeByKey ¶
根据key转换map对象string值为time.Time值
func FilterMapFieldNull ¶
过滤map对象的nil值属性
func GetStringCode ¶
func StringToBytes ¶
StringToBytes converts string to byte slice without a memory allocation.
func TransfMap2Struct ¶
Map数据转换为Struct结构(原始变量类型)
func TransfMap2StructNulltype ¶
Map数据转换为Struct结构(null变量类型,包:gopkg.in/guregu/null.v3)
func TransfStruct2Map ¶
Struct数据转换为Map结构
Types ¶
type MapSorter ¶
func NewMapSorter ¶
Click to show internal directories.
Click to hide internal directories.