utils

package
v0.0.0-...-4e81a15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2017 License: GPL-3.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCardCode

func GenerateCardCode() string

GenerateCardCode 生成用户卡号

func GenerateCode

func GenerateCode(count, lenght int) []string

GenerateCode 生成指定数量的固定长度的随机码,全小写,包含字母和数组

func GetIPAdress

func GetIPAdress(r *http.Request) string

GetIPAdress 通过请求获取IP地址

func IsContainInt

func IsContainInt(slice []int, a int) bool

IsContainInt Int数组包含

func StringSliceIsContain

func StringSliceIsContain(slice []string, str string) bool

StringSliceIsContain 字符串数组包含

func UnionInt

func UnionInt(x, y []int) []int

UnionInt int数组并集

func ValiateCount

func ValiateCount(temp int, tempName string) error

ValiateCount 校验数量

func ValiateLabel

func ValiateLabel(label string) error

ValiateLabel 校验名称是否有效

func ValiateLabelSize

func ValiateLabelSize(label string, minSize, maxSize int) error

ValiateLabelSize 校验名称大小是否有效

func ValiateMobileNumber

func ValiateMobileNumber(mobileNumber string) error

ValiateMobileNumber 校验手机号码是否有效

func ValiateMoney

func ValiateMoney(temp float32, tempName string) error

ValiateMoney 校验金钱

func ValiateStringSize

func ValiateStringSize(temp, tempName string, minSize, maxSize int) error

ValiateStringSize 校验字符串大小是否有效

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL