Documentation ¶
Index ¶
- Constants
- func BytesToLines(bytes []byte) []string
- func GetListKeys(list map[string]string) []string
- func GetListValues(list map[string]string) []string
- func Lines2List(lines []string, useASCII bool) map[string]string
- func LoadTLDs(ctx context.Context, urls []string, timeout time.Duration, ...) (map[string]string, error)
- func ReadCacheFile(fileName string) ([]byte, error)
- func RemoveNoiseLines(srcLines []string) []string
- func StringBufferToLines(buffer string) []string
- func ToASCII(src string) string
- func ToUnicode(src string) string
- func WrapError(message string, err error) error
- func WriteCacheFile(fileName string, list map[string]string, perm fs.FileMode) error
Constants ¶
View Source
const ( // Main list. MainPublicSuffixListFile = "https://publicsuffix.org/list/public_suffix_list.dat" // Fallback list. BackupPublicSuffixListFile = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat" )
Variables ¶
This section is empty.
Functions ¶
func BytesToLines ¶
BytesToLines - Convert byte buffer to array of strings and remove noise lines.
func GetListKeys ¶
GetListKeys - get list of keys from generic map as string array.
func GetListValues ¶
GetListValues - get list of keys from generic map as string array.
func Lines2List ¶
Lines2List - Add normalized lines to list with optional PunyCode useASCII.
func ReadCacheFile ¶
func RemoveNoiseLines ¶
RemoveNoiseLines - remove blank lines and comments, converting each kept line to lowercase.
func StringBufferToLines ¶
StringBufferToLines - split string into array of strings and remove noise lines.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.