Documentation ¶
Index ¶
- Constants
- func BinaryToDecimal(bit string) (num int)
- func Float32ToString(floatNum float32, prec ...int) (floatStr string)
- func Float64ToString(floatNum float64, prec ...int) (floatStr string)
- func GetRandomNumber(l int) string
- func GetRandomPureString(l int) string
- func GetRandomString(l int) string
- func Int2String(intNum int) (intStr string)
- func Int642String(intNum int64) (int64Str string)
- func JoinInts(is []int64) string
- func MergeSliceRemoveDuplicate(slice1, slice2 []int) (merged []int)
- func SplitInts(s string) ([]int64, error)
- func String2Float32(floatStr string) (floatNum float32)
- func String2Float64(floatStr string) (floatNum float64)
- func String2Int(intStr string) (intNum int)
- func String2Int64(intStr string) (int64Num int64)
- func VerifyIDCard(idCard string) bool
- func VerifyPhoneNumber(phone string) bool
- type BodyMap
- func (bm BodyMap) CheckEmptyError(keys ...string) error
- func (bm BodyMap) EncodeAliPaySignParams() string
- func (bm BodyMap) EncodeGetParams() string
- func (bm BodyMap) EncodeSortParams() string
- func (bm BodyMap) EncodeWeChatSignParams(apiKey string) string
- func (bm BodyMap) Get(key string) string
- func (bm BodyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
- func (bm BodyMap) Remove(key string)
- func (bm BodyMap) Set(key string, value interface{})
- func (bm *BodyMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)
Constants ¶
View Source
const ( TimeLayout = "2006-01-02 15:04:05" TimeLayout_2 = "20060102150405" DateLayout = "2006-01-02" NULL = "" )
Variables ¶
This section is empty.
Functions ¶
func MergeSliceRemoveDuplicate ¶ added in v1.0.2
int数组合并,去重复
func VerifyIDCard ¶ added in v1.0.2
计算规则参考“中国国家标准化管理委员会”官方文档:http://www.gb688.cn/bzgk/gb/newGbInfo?hcno=080D6FBF2BB468F9007657F26D60013E 身份证号码校验
Types ¶
type BodyMap ¶ added in v1.0.2
type BodyMap map[string]interface{}
func (BodyMap) CheckEmptyError ¶ added in v1.0.2
func (BodyMap) EncodeAliPaySignParams ¶ added in v1.0.2
("bar=baz&foo=quux") sorted by key.
func (BodyMap) EncodeGetParams ¶ added in v1.0.2
func (BodyMap) EncodeSortParams ¶ added in v1.0.4
("bar=baz&foo=quux") sorted by key.
func (BodyMap) EncodeWeChatSignParams ¶ added in v1.0.2
("bar=baz&foo=quux") sorted by key.
func (BodyMap) MarshalXML ¶ added in v1.0.2
func (*BodyMap) UnmarshalXML ¶ added in v1.0.2
Source Files ¶
Click to show internal directories.
Click to hide internal directories.