Documentation ¶
Index ¶
- Constants
- func Atoa(str interface{}) string
- func Atoi(str interface{}) int
- func Atoui(str interface{}) uint
- func Bytes2String(b []byte) string
- func CheckErr(err error)
- func CheckErrPanic(err error)
- func DigestString(s string) string
- func ExcelSheetNameReplace(fileName string) string
- func FileNameReplace(fileName string) string
- func GetWDPath() string
- func HashString(encode string) uint64
- func IsDirExists(path string) bool
- func IsFileExists(path string) bool
- func IsNum(a string) bool
- func JsonString(obj interface{}) string
- func JsonpToJson(json string) string
- func KeyInsParse(keyins string) []string
- func MakeHash(s string) string
- func MakeMd5(obj interface{}, length int) string
- func MakeUnique(obj interface{}) string
- func Mkdir(Path string)
- func RandomCreateBytes(n int, alphabets ...byte) []byte
- func RelPath(targpath string) string
- func SnakeCaseToCamelCase(snakeCase string) (camelCase string)
- func String2Bytes(s string) []byte
- func WalkDir(targpath string, suffixes ...string) (dirlist []string)
- func WalkFiles(targpath string, suffixes ...string) (filelist []string)
- func WalkRelDir(targpath string, suffixes ...string) (dirlist []string)
- func WalkRelFiles(targpath string, suffixes ...string) (filelist []string)
- func XML2mapstr(xmldoc string) map[string]string
Constants ¶
const (
// Spider The initial value of KeyIn is enabled
UseKeyIn = "\r\t\n"
)
Variables ¶
This section is empty.
Functions ¶
func Bytes2String ¶
Bytes2String direct conversion of the underlying pointer, both pointing to the same memory, change another one will change. Efficiency is string ([] byte {}) more than a hundred times, and the greater the conversion efficiency of the more obvious advantages.
func CheckErrPanic ¶
func CheckErrPanic(err error)
func DigestString ¶
func ExcelSheetNameReplace ¶
Replace the illegal characters in the Excel worksheet name with the underscore
func FileNameReplace ¶
func HashString ¶
func IsDirExists ¶
The IsDirExists judges path is directory or not.
func IsFileExists ¶
The IsFileExists judges path is file or not.
func JsonpToJson ¶
JsonpToJson modify jsonp string to json string example: forbar ({a: "1", b: 2}) to {"a": "1", "b": 2}
func KeyInsParse ¶
Cut the custom information entered by the user
func RandomCreateBytes ¶
RandomCreateBytes generate random [] byte by specify chars.
func SnakeCaseToCamelCase ¶
func String2Bytes ¶
String2Bytes direct conversion of the underlying pointer, both pointing to the same memory, change another one will change. Efficiency is string ([] byte {}) more than a hundred times, and the greater the conversion efficiency of the more obvious advantages. After the conversion, if the other operations do not change the characters directly, the program will crash. such as b: = String2bytes ("xxx"); b [1] = 'd'; the program will panic.
func WalkRelDir ¶
Traverse the directory, specify the suffix, and return the relative path
func WalkRelFiles ¶
traverse the file, specify the suffix, and return the relative path
func XML2mapstr ¶
simple xml to string support utf8
Types ¶
This section is empty.