Documentation
¶
Index ¶
- func DecodeToGBK(text string) (string, error)
- func Dial(ip string, port int) bool
- func GetWDPath() string
- func IsDirExists(path string) bool
- func IsFileExists(path string) bool
- func IsIP(ip string) bool
- func IsInputMatchRegex(input, regex string) bool
- func Load(data interface{}, filename string)
- func Mkdir(Path string)
- func NodeHtml(n *html.Node) string
- func NodeText(node *html.Node) string
- func RandomUA() string
- func RelPath(targpath string) string
- func RemoveSlice(slice []interface{}, elem interface{}) []interface{}
- func RenderNode(n *html.Node) string
- func SplitHtml(htmStr string, maxLen int) []string
- func Store(data interface{}, filename string)
- func Substr(str string, start int, length int) string
- func VerifyProxyIP(url string) bool
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirExists ¶
The IsDirExists judges path is directory or not.
func IsFileExists ¶
The IsFileExists judges path is file or not.
func IsInputMatchRegex ¶
IsInputMatchRegex will verify the input string is match the regex or not. This function will recover the panic if regex can't be parsed.
func RemoveSlice ¶
func RemoveSlice(slice []interface{}, elem interface{}) []interface{}
RemoveSlice 删除切片中的某个元素
func RenderNode ¶
func VerifyProxyIP ¶
VerifyProxyIP will use given ip and port as proxy, if the proxy is available, return true, otherwise return false.
func WalkRelDir ¶
遍历目录,可指定后缀,返回相对路径
func WalkRelFiles ¶
遍历文件,可指定后缀,返回相对路径
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.