Documentation ¶
Index ¶
- Constants
- func AgeToBirthday(Age int) time.Time
- func ArrTostring(v interface{}, sep string) string
- func BirthdayToAge(birthday time.Time) int
- func BuildLimit(cur, ps int) string
- func BuildRange(cur, ps, total int) (int, int)
- func BytesToUint32(from []byte) (to uint32)
- func CheckHashNext(ps, len int) (hasNext int)
- func ContainAnySubstr(str string, substrs []string) bool
- func GenKey(sep string, keys ...interface{}) (key string)
- func Join(v interface{}, sep string) (string, error)
- func StringArrDiff(a1, a2 []string) (diff []string)
- func StringToUint32Arr(str string, sep string) (r []uint32)
- func SubString(str string, begin, length int) (substr string)
- func ToBool(v interface{}) (bool, error)
- func ToFloat32(v interface{}) (float32, error)
- func ToFloat64(v interface{}) (float64, error)
- func ToInt(v interface{}) (int, error)
- func ToInt16(v interface{}) (int16, error)
- func ToInt32(v interface{}) (int32, error)
- func ToInt64(v interface{}) (int64, error)
- func ToInt8(v interface{}) (int8, error)
- func ToString(v interface{}) string
- func ToStringSlice(v interface{}) ([]string, error)
- func ToUint(v interface{}) (uint, error)
- func ToUint16(v interface{}) (uint16, error)
- func ToUint32(v interface{}) (uint32, error)
- func ToUint64(v interface{}) (uint64, error)
- func ToUint8(v interface{}) (uint8, error)
- func Uint32ArrDiff(a1, a2 []uint32) (diff []uint32)
- func Uint32ArrIntersection(a1, a2 []uint32) (both []uint32)
- func Uint32ArrTostring(ids []uint32) string
- func Uint32ToBytes(from uint32) (to []byte)
- func UrlToShort(url_long string) (url_short string, e error)
- type PageRes
- type Pages
- type SqlObj
Constants ¶
View Source
const DEFAULT_CUR = 1
View Source
const DEFAULT_PS = 10
View Source
const PAGE_HASNEXT_KEY = "hasNext"
View Source
const PAGE_RES_NAME = "list"
Variables ¶
This section is empty.
Functions ¶
func AgeToBirthday ¶
func BirthdayToAge ¶
func BytesToUint32 ¶
func ContainAnySubstr ¶
ContainAnySubstr: 输入string和一个slice的substring,给出这个string是否包含任何一个substring
func ToStringSlice ¶
func Uint32ArrIntersection ¶
求两个数组的交集,返回存在于a1并且存在a2中的值
func UrlToShort ¶
Types ¶
type PageRes ¶
type PageRes struct { HasNext int `json:"hasNext"` Start string `json:"start"` Ps int `json:"ps"` List interface{} `json:"list"` }
func FormatPageRes ¶
构建包含list数据的分页结果
Click to show internal directories.
Click to hide internal directories.