Versions in this module Expand all Collapse all v0 v0.13.0 Feb 16, 2021 Changes in this version + const ExceptionType + const NormalType + const Version + const WildcardType + var CookieJarList cookiejar.PublicSuffixList = cookiejarList + var DefaultFindOptions = &FindOptions + var DefaultList = NewList() + var DefaultParserOptions = &ParserOption + var DefaultRule = MustNewRule("*") + func Domain(name string) (string, error) + func DomainFromListWithOptions(l *List, name string, options *FindOptions) (string, error) + func Labels(name string) []string + func ToASCII(s string) (string, error) + func ToUnicode(s string) (string, error) + type DomainName struct + Rule *Rule + SLD string + TLD string + TRD string + func Parse(name string) (*DomainName, error) + func ParseFromListWithOptions(l *List, name string, options *FindOptions) (*DomainName, error) + func (d *DomainName) String() string + type FindOptions struct + DefaultRule *Rule + IgnorePrivate bool + type List struct + func NewList() *List + func NewListFromFile(path string, options *ParserOption) (*List, error) + func NewListFromString(src string, options *ParserOption) (*List, error) + func (l *List) AddRule(r *Rule) error + func (l *List) Find(name string, options *FindOptions) *Rule + func (l *List) Load(r io.Reader, options *ParserOption) ([]Rule, error) + func (l *List) LoadFile(path string, options *ParserOption) ([]Rule, error) + func (l *List) LoadString(src string, options *ParserOption) ([]Rule, error) + func (l *List) Size() int + type ParserOption struct + ASCIIEncoded bool + PrivateDomains bool + type Rule struct + Length int + Private bool + Type int + Value string + func DefaultRules() [9130]Rule + func MustNewRule(content string) *Rule + func NewRule(content string) (*Rule, error) + func NewRuleUnicode(content string) (*Rule, error) + func (r *Rule) Decompose(name string) (result [2]string) + func (r *Rule) Match(name string) bool