Documentation ¶
Index ¶
- func AryStructName(ary interface{}) (string, error)
- func Btos(b bool) string
- func BytesTos(b []byte) string
- func CamelStr(s string) string
- func Charbasetoi64(str string) int64
- func DataToJson(m interface{}) (string, error)
- func DataToMap(v interface{}) (map[string]interface{}, error)
- func DecodeBase64(s string) string
- func EncodeBase64(s string) string
- func F32tos(f float32) string
- func GetIdByKeys(args map[string]interface{}, key1 string, key2 string) int64
- func GetSuffix(s string) string
- func I64tocharbase(v int64) string
- func I64tos(i int64) string
- func IdsToAry(str string) []int64
- func IsEmpty(d interface{}) (result bool)
- func IsNil(d interface{}) (isNil bool)
- func IsNotEmpty(d interface{}) (result bool)
- func IsPhone(str string) bool
- func Itos(i int) string
- func JsonToMap(s string) (ma map[string]interface{}, err error)
- func JsonToSlice(s string) (*[]interface{}, error)
- func JsonToStruct(s string, m interface{}) error
- func LenCheck(m interface{}, max int) error
- func MapToMapStr(ma map[string]interface{}) map[string]string
- func MapToQuery(ma map[string]interface{}) string
- func MapToXml(m *map[string]string) string
- func Md5(s string, x bool) string
- func Merge(target map[string]string, obj map[string]string)
- func ModifySysFilePath(f string) string
- func PageToDic(page *Page) *map[string]interface{}
- func QueryToMap(str string) map[string]interface{}
- func RandomStr() string
- func RemoveDuplicate(a interface{}) (ret []interface{})
- func Round(f float64, n int) float64
- func Sha256(s string, secret string, x bool) string
- func SnakeStr(s string) string
- func Stobytes(s string) []byte
- func Stoi(s string) (int, error)
- func Stoi16(s string) (int16, error)
- func Stoi32(s string) (int32, error)
- func Stoi64(s string) (int64, error)
- func Stoui32(s string) (uint32, error)
- func StrLen(s string) int
- func StrToTime(format SaTimeFormat, s string) time.Time
- func StructElemValue(obj interface{}, k string) reflect.Value
- func StructName(obj interface{}) (string, error)
- func SubIndex(s string, sub string) int
- func SubStr(s string, start int, cnt int) string
- func TimeStr(t time.Time, format SaTimeFormat) string
- func ToAry(arr interface{}) ([]interface{}, error)
- func ToAryMap(arr interface{}) ([]map[string]interface{}, error)
- func ToAryStr(arr interface{}) ([]string, error)
- func ToBool(d interface{}) (bool, error)
- func ToBytes(v interface{}) ([]byte, error)
- func ToFloat32(d interface{}) (float32, error)
- func ToIdAry(args map[string]interface{}, key string) []int64
- func ToIds(ary []int64) string
- func ToInt(d interface{}) (int, error)
- func ToInt32(d interface{}) (int32, error)
- func ToInt64(d interface{}) (int64, error)
- func ToInt8(d interface{}) (int8, error)
- func ToMap(ma interface{}) (map[string]interface{}, error)
- func ToMapStr(ma interface{}) (map[string]string, error)
- func ToPrice(f float32) float32
- func ToStr(d interface{}) (string, error)
- func TrimAllSpace(s string) string
- func TrimH5Tags(src string) (str string)
- func TrimPrefixSpace(s string) string
- func TrimSuffixSpace(s string) string
- func ValueToMap(v reflect.Value) *map[string]interface{}
- func WeekIndex(t time.Time) int
- func XmlToMap(s string) (*map[string]string, error)
- type ListResult
- type Map
- type NullInt
- type NullInt64
- type NullString
- type Page
- type SaTimeFormat
- type StringMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AryStructName ¶
func Charbasetoi64 ¶
func DataToJson ¶
func DecodeBase64 ¶
func EncodeBase64 ¶
func IsNotEmpty ¶
func IsNotEmpty(d interface{}) (result bool)
func JsonToSlice ¶
func JsonToStruct ¶
func MapToMapStr ¶
func ModifySysFilePath ¶
func RemoveDuplicate ¶
func RemoveDuplicate(a interface{}) (ret []interface{})
func StructElemValue ¶
func StructName ¶
func TrimAllSpace ¶
func TrimPrefixSpace ¶
func TrimSuffixSpace ¶
func ValueToMap ¶
Types ¶
type ListResult ¶
type NullInt64 ¶
func I64FromMap ¶
type NullString ¶
func StrFromMap ¶
func StrFromMap(ma map[string]interface{}, key string) NullString
type SaTimeFormat ¶
type SaTimeFormat int8
const ( TimeFormat_Default SaTimeFormat = iota //"2006-01-02 15:04:05" TimeFormat_hhmm //"15:04" TimeFormat_sys_default //"2006-01-02T15:04:05Z" TimeFormat_yymm_Dotted //"2006.01" TimeFormat_yymmdd_Dotted //"2006.01.02" TimeFormat_yymmddhhmm_Dotted //"2006.01.02 15:04" TimeFormat_Dotted //"2006.01.02 15:04:05" TimeFormat_yymm_Line //"2006-01" TimeFormat_yymmdd_Line //"2006-01-02" TimeFormat_yymmddhhmm_Line //"2006-01-02 15:04" TimeFormat_yymm_Chinese //"2006年01月" TimeFormat_yymmdd_Chinese //"2006年01月02日" TimeFormat_yymmddhhmm_Chinese //"2006年01月02日 15点04分" TimeFormat_Chinese //"2006年01月02日 15时04分05秒" TimeFormate_yearStr //2006 TimeFormate_monthStr //200601 TimeFormate_dayStr //20060102 TimeFormate_hourStr //2006010215 TimeFormate_minuteStr //200601021504 TimeFormate_secondStr //20060102150405 )
Click to show internal directories.
Click to hide internal directories.