Documentation ¶
Index ¶
- Variables
- func Base64Decode(input string) string
- func Base64Encode(input string) string
- func DecodeHTMLBody(body io.Reader, charset string) (io.Reader, error)
- func DetectContentEncoding(body io.Reader) string
- func ExpireBySecond(n int) time.Duration
- func GetFileContent(file string) []byte
- func GetFileSHA1(src []byte) string
- func Html2Md(html string) string
- func I2T(n int) time.Duration
- func IsBoolString(input string) bool
- func IsCssSelector(field string) bool
- func IsDir(src string) bool
- func IsDomTagName(field string) bool
- func IsFile(src string) bool
- func IsNotEmptyAndNotDefaultString(value string, defaults string) bool
- func IsStrInArray(arr []string, s string) bool
- func IsVaildAddr(addr string) bool
- func IsVaildAddrWithHttpProtocol(addr string) bool
- func IsVaildAddrWithWsProtocol(addr string) bool
- func IsVaildHeadlessAddr(addr string) bool
- func IsVaildIPAddr(addr string) bool
- func IsVaildLogLevel(level string) bool
- func IsVaildPortRange(port int) bool
- func IsVaildProxyAddr(addr string) bool
- func JSONStringify(r interface{}) string
- func LinkResolveRelative(resolveUrl string, baseUrl string) (string, error)
- func ScanDirFiles(baseDir string) (files []string)
- func StringToPositiveInteger(s string) int
Constants ¶
This section is empty.
Variables ¶
View Source
var DomList = func() []string { return []string{"html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4", "h5", "h6", "main", "nav", "section", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "menu", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "summary", "slot", "template", "acronym", "applet", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "param", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp"} }()
ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func DecodeHTMLBody ¶
decodeHTMLBody returns an decoding reader of the html Body for the specified `charset` If `charset` is empty, decodeHTMLBody tries to guess the encoding from the content
func DetectContentEncoding ¶
According to the returned content, automatically determine the content encoding format
func ExpireBySecond ¶
func GetFileContent ¶
func GetFileSHA1 ¶
func IsBoolString ¶
func IsCssSelector ¶
func IsDomTagName ¶
func IsStrInArray ¶
func IsVaildAddr ¶
func IsVaildHeadlessAddr ¶
func IsVaildIPAddr ¶
func IsVaildLogLevel ¶
func IsVaildPortRange ¶
func IsVaildProxyAddr ¶
func JSONStringify ¶
func JSONStringify(r interface{}) string
func LinkResolveRelative ¶
func ScanDirFiles ¶
func StringToPositiveInteger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.