Documentation ¶
Index ¶
Constants ¶
View Source
const ( Uppercase string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Lowercase = "abcdefghijklmnopqrstuvwxyz" Alphabetic = Uppercase + Lowercase Numeric = "0123456789" Alphanumeric = Alphabetic + Numeric Symbols = "`" + `~!@#$%^&*()-_+={}[]|\;:"<>,./?` Hex = Numeric + "abcdef" )
Charsets
Variables ¶
This section is empty.
Functions ¶
func JSONDecode ¶
JSONDecode if input is json format,return a map if input is empty, wrong format, return nil can't handle json array,e.g., [1,2,3],use JSONDecodeArr instead
func JSONDecodeArr ¶
func JSONDecodeArr(encodeStr string) []interface{}
JSONDecodeArr handle json array,e.g., [1,2,3]
func JSONEncode ¶
func JSONEncode(obj interface{}) string
JSONEncode return encoded json string if no error, return "" if error occurs
func RandomString ¶
RandomString returns a random string length: str length charsets:
- uppercase,
- lowercase,
- include uppercase & lowercase,
- numbers,
- include uppercase & lowercase & numbers,
- symbols,
- hex
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.