Documentation ¶
Index ¶
- Variables
- func AppendId(ary []int64, id int64) []int64
- func AppendStr(ary []string, str string) []string
- func AryStructName(ary interface{}) (string, error)
- func AryToIds(ary []int64, fullComma bool) string
- func Btos(b bool) string
- func BytesToModel(b []byte, m interface{}) error
- func BytesToStr(b []byte) string
- func CamelStr(s string) string
- func CharToId(str string) int64
- func CharToIdWithSource(str string, source string) int64
- func CodeToId(code string, length int) (id int64)
- func CodeToIdWithSource(code string, length int, source []string) (id int64)
- func ContainStrs(item string, ary []string) (exist bool)
- func DecodeBase64(s string) string
- func EncodeBase64(s string) string
- func F32tos(f float32) string
- func Fen2Yuan(fen interface{}, roundType ...RoundType) (yuan float64)
- func Float64(d interface{}) float64
- func FloatToInt64(value interface{}, digit int, roundType ...RoundType) int64
- func FormatIds(str string) string
- func GetIdByKeys(args map[string]interface{}, key1 string, key2 string) int64
- func GetSuffix(s string) string
- func I64tos(i int64) string
- func IdToChar(v int64) string
- func IdToCharWithSource(v int64, minLen int, source string) string
- func IdToCode(id int64, length int) (code string)
- func IdToCodeWithSource(id int64, length int, source []string) (code string)
- func IdsToAry(str string) []int64
- func InArray(item interface{}, ary interface{}) (exist bool)
- func InArrayFun(ary interface{}, fun func(i int) bool) bool
- func InInt(item int, ary []int) (exist bool)
- func InInt64(item int64, ary []int64) (exist bool)
- func InStrs(item string, ary []string) (exist bool)
- func Int(d interface{}) int
- func Int64(d interface{}) int64
- func IntToFloat(value interface{}, digit int, roundType ...RoundType) float32
- func IsImg(url string) bool
- func IsPhone(str string) bool
- func IsVideo(url string) bool
- func Itos(i int) string
- func JoinStr(org string, elems ...string) string
- func LenCheck(m interface{}, max int) error
- func Li2Yuan(li interface{}, roundType ...RoundType) (yuan float64)
- func MapToXml(m *map[string]string) string
- func Md5(s string, lowercase bool) string
- func ModifySysFilePath(f string) string
- func Qian2Yuan(qian interface{}, roundType ...RoundType) (yuan float64)
- func RandomStr() string
- func RoundFloat32(f float32, n int) float32
- func RoundFloat64(f float64, n int) float64
- func RoundYuan(yuan interface{}, roundType ...RoundType) float64
- func SQLColumn(str string) string
- func Sha256(s string, secret string, lowercase bool) string
- func SnakeStr(s string) string
- func Split(s, sep string) []string
- 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 StrToBytes(s string) []byte
- func StrToData(str string) (interface{}, error)
- func StrToModel(str string, m interface{}) error
- func String(data interface{}) string
- 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 ToAry(data interface{}) ([]interface{}, error)
- func ToBool(d interface{}) (bool, error)
- func ToBytes(data interface{}) ([]byte, error)
- func ToFloat32(d interface{}) (float32, error)
- func ToFloat64(d interface{}) (float64, error)
- func ToIds(ary interface{}, fullComma bool) string
- func ToInt(d interface{}) (int, error)
- func ToInt32(d interface{}) (int32, error)
- func ToInt64(d interface{}) (int64, error)
- func ToInt64Ary(data interface{}) ([]int64, error)
- func ToInt8(d interface{}) (int8, error)
- func ToMap(data interface{}) (map[string]interface{}, error)
- func ToMapAry(data interface{}) ([]map[string]interface{}, error)
- func ToSQLIds(ary []string) string
- func ToStr(data interface{}) (string, error)
- func ToStrAry(data interface{}) ([]string, error)
- func ToStrMap(data interface{}) (map[string]string, error)
- func TrimH5Tags(src string) (str string)
- func TrimPreSuffixSpace(s string) string
- func TrimPrefixSpace(s string) string
- func TrimSpace(s string) string
- func TrimSuffixSpace(s string) string
- func ValidCheck(ptr interface{}) (err error)
- func ValueToMap(v reflect.Value) *map[string]interface{}
- func XmlToMap(s string) (map[string]interface{}, error)
- func Yuan2Fen(yuan interface{}, roundType ...RoundType) (fen int64)
- func Yuan2Li(yuan interface{}, roundType ...RoundType) (li int64)
- func Yuan2Qian(yuan interface{}, roundType ...RoundType) (li int64)
- type NullInt
- type NullInt64
- type NullString
- type RoundType
- type StringMap
Constants ¶
This section is empty.
Variables ¶
View Source
var CodeSource = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ" //方便给人识别的编码
Functions ¶
func AryStructName ¶
func BytesToModel ¶
func BytesToStr ¶
func CharToIdWithSource ¶
func CodeToIdWithSource ¶
func ContainStrs ¶
func DecodeBase64 ¶
func EncodeBase64 ¶
func FloatToInt64 ¶
FloatToInt 解决精度丢失问题 例如:19.9 * 100 = 1889 提供四舍五入、上下取整方式 digit是小数点后位数
func IdToCodeWithSource ¶
func InArrayFun ¶
func IntToFloat ¶
IntToFloat 解决精度丢失问题 例如:19.9 * 100 = 1889 提供四舍五入、上下取整方式 digit是小数点后位数
func ModifySysFilePath ¶
func RoundFloat32 ¶
func RoundFloat64 ¶
func StrToModel ¶
func StructElemValue ¶
func StructName ¶
func ToIds ¶
ToIds fullComma为true时: []{1,2,3} => ,1,2,3, fullComma为false时: []{1,2,3} => 1,2,3 ary支持类型:[]string []int64 []int
func ToInt64Ary ¶
func ValueToMap ¶
Types ¶
type NullString ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.