Documentation ¶
Index ¶
- Constants
- func Decode(src string) (string, error)
- func IsDate(s string) bool
- func IsDateTime(s string) bool
- func IsDecimal(s string) bool
- func IsEmail(s string) bool
- func IsEmptyLine(s string) bool
- func IsHex(s string) bool
- func IsIPv4(v string) bool
- func IsMobile(s string) bool
- func IsNumber(s string) bool
- func IsURL(s string) bool
Constants ¶
View Source
const ( RegPatNumberDecimal = "^[+-]*\\d+$" RegPatNumberHex = "^0[xX][0-9a-fA-F]+$" RegPatColorHex = "^#[0-9a-fA-F]+$" RegPatFileURL = "^https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]$" RegPatNumber = "((-?\\d+)(\\.\\d+)?)" RegPatScienceNote = "[-+]?\\d+(\\.?\\d+)?[eE]{1}[-+]?\\d+" RegPatString = "[A-Za-z0-9]+" RegPatDate = "" /* 126-byte string literal not displayed */ RegPatDateTime = "" /* 193-byte string literal not displayed */ RegPatChinese = "([\u4e00-\u9fa5]+)" RegPatIP = `((0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])\.){3}(0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])` RegPatEmail = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$" RegPatMobile = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|191|199|193|(147))\\d{8}$" )
View Source
const (
CipherBase64 = "base64"
)
Variables ¶
This section is empty.
Functions ¶
func IsDateTime ¶
func IsEmptyLine ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.