Documentation ¶
Index ¶
- Variables
- func AppendFile(filename string, data []byte)
- func DelItemArr(arr []string, f func(string) bool) []string
- func EscapeChar(data string, char ...string) string
- func Itertools(prefix_length int, char []rune) []string
- func Pencode(listEncoder []string, data string) string
- func ReadFile(filename string) ([]string, error)
- func ReadJson(data string) (map[string]interface{}, error)
- func SingleLine(data string) string
- func Str2Int(data string) int
- func Str2Rune(data string) []rune
- func WriteFile(filename string, data []byte) error
- func ZipFile(destinationZip string, sourceFile ...File) error
- type File
Constants ¶
This section is empty.
Variables ¶
var All = []rune{
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'/', '{', '}', '_', '-', '.', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '=', '+', '[', ']', '\\', '|', ';', ':', '\'', '"', '<', '>', ',', '?', '`', '~',
}
var Char = []rune{
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
}
var CharUpper = []rune{
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
}
var Charlower = []rune{
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
}
var Num = []rune{
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
}
var Special = []rune{
'/', '{', '}', '_', '-', '.', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '=', '+', '[', ']', '\\', '|', ';', ':', '\'', '"', '<', '>', ',', '?', '`', '~',
}
Functions ¶
func AppendFile ¶ added in v0.0.4
AppendFile append data to file
func DelItemArr ¶ added in v0.0.4
DelItemArr delete item in array
func EscapeChar ¶ added in v0.0.4
EscapeChar escape char
func Itertools ¶
Using prefix_length := 3
feature.Itertools(prefix_length, feature.Char)
Itertools return all possible combination of characters
func Pencode ¶ added in v0.0.4
Using pencode to encode/decode data
Supported encoder: b64encode, hexencode, htmlescape, jsonescape, unicodeencode, urlencode, urlencodeall ,xmlencode, utf16, utf16be, xmlescape
Supported decoder: b64decode, hexdecode, htmlunescape, jsonunescape, unicodedecode, urldecode, xmlunescape
Supported hash: md5, sha1, sha224 ,sha256, sha384 ,sha512
Other: lower, upper
func ReadJson ¶ added in v0.0.4
For example it return like
map[string]interface {}{ "message": []interface {}{ map[string]interface {}{ "content": "3", }, }, }
xx, _ = datatemp["message"].([]interface{})[0].(map[string]interface{})["content"].(string)