Versions in this module Expand all Collapse all v0 v0.1.0 Sep 14, 2017 Changes in this version + const All + const BCP47 + const CLDR + const CLDRVersion + const Default + const Deprecated + const DeprecatedBase + const DeprecatedRegion + const DeprecatedScript + const Legacy + const Macro + const NumCompactTags + const Raw + const SuppressScript + var ErrMissingLikelyTagsData = errors.New("missing likely tags data") + func CompactIndex(t Tag) (index int, ok bool) + type Base struct + func MustParseBase(s string) Base + func ParseBase(s string) (Base, error) + func (b Base) ISO3() string + func (b Base) IsPrivateUse() bool + func (b Base) String() string + type CanonType int + func (c CanonType) Canonicalize(t Tag) (Tag, error) + func (c CanonType) Compose(part ...interface{}) (t Tag, err error) + func (c CanonType) Make(s string) Tag + func (c CanonType) MustParse(s string) Tag + func (c CanonType) Parse(s string) (t Tag, err error) + type Confidence int + const Exact + const High + const Low + const No + func Comprehends(speaker, alternative Tag) Confidence + func (c Confidence) String() string + type Coverage interface + BaseLanguages func() []Base + Regions func() []Region + Scripts func() []Script + Tags func() []Tag + var Supported Coverage = allSubtags{} + func NewCoverage(list ...interface{}) Coverage + type Extension struct + func ParseExtension(s string) (e Extension, err error) + func (e Extension) String() string + func (e Extension) Tokens() []string + func (e Extension) Type() byte + type MatchOption func(*matcher) + func PreferSameScript(preferSame bool) MatchOption + type Matcher interface + Match func(t ...Tag) (tag Tag, index int, c Confidence) + func NewMatcher(t []Tag, options ...MatchOption) Matcher + type Region struct + func EncodeM49(r int) (Region, error) + func MustParseRegion(s string) Region + func ParseRegion(s string) (Region, error) + func (r Region) Canonicalize() Region + func (r Region) Contains(c Region) bool + func (r Region) ISO3() string + func (r Region) IsCountry() bool + func (r Region) IsGroup() bool + func (r Region) IsPrivateUse() bool + func (r Region) M49() int + func (r Region) String() string + func (r Region) TLD() (Region, error) + type Script struct + func MustParseScript(s string) Script + func ParseScript(s string) (Script, error) + func (s Script) IsPrivateUse() bool + func (s Script) String() string + type Tag struct + var Afrikaans Tag = Tag{} + var Albanian Tag = Tag{} + var AmericanEnglish Tag = Tag{} + var Amharic Tag = Tag{} + var Arabic Tag = Tag{} + var Armenian Tag = Tag{} + var Azerbaijani Tag = Tag{} + var Bengali Tag = Tag{} + var BrazilianPortuguese Tag = Tag{} + var BritishEnglish Tag = Tag{} + var Bulgarian Tag = Tag{} + var Burmese Tag = Tag{} + var CanadianFrench Tag = Tag{} + var Catalan Tag = Tag{} + var Chinese Tag = Tag{} + var Croatian Tag = Tag{} + var Czech Tag = Tag{} + var Danish Tag = Tag{} + var Dutch Tag = Tag{} + var English Tag = Tag{} + var Estonian Tag = Tag{} + var EuropeanPortuguese Tag = Tag{} + var EuropeanSpanish Tag = Tag{} + var Filipino Tag = Tag{} + var Finnish Tag = Tag{} + var French Tag = Tag{} + var Georgian Tag = Tag{} + var German Tag = Tag{} + var Greek Tag = Tag{} + var Gujarati Tag = Tag{} + var Hebrew Tag = Tag{} + var Hindi Tag = Tag{} + var Hungarian Tag = Tag{} + var Icelandic Tag = Tag{} + var Indonesian Tag = Tag{} + var Italian Tag = Tag{} + var Japanese Tag = Tag{} + var Kannada Tag = Tag{} + var Kazakh Tag = Tag{} + var Khmer Tag = Tag{} + var Kirghiz Tag = Tag{} + var Korean Tag = Tag{} + var Lao Tag = Tag{} + var LatinAmericanSpanish Tag = Tag{} + var Latvian Tag = Tag{} + var Lithuanian Tag = Tag{} + var Macedonian Tag = Tag{} + var Malay Tag = Tag{} + var Malayalam Tag = Tag{} + var Marathi Tag = Tag{} + var ModernStandardArabic Tag = Tag{} + var Mongolian Tag = Tag{} + var Nepali Tag = Tag{} + var Norwegian Tag = Tag{} + var Persian Tag = Tag{} + var Polish Tag = Tag{} + var Portuguese Tag = Tag{} + var Punjabi Tag = Tag{} + var Romanian Tag = Tag{} + var Russian Tag = Tag{} + var Serbian Tag = Tag{} + var SerbianLatin Tag = Tag{} + var SimplifiedChinese Tag = Tag{} + var Sinhala Tag = Tag{} + var Slovak Tag = Tag{} + var Slovenian Tag = Tag{} + var Spanish Tag = Tag{} + var Swahili Tag = Tag{} + var Swedish Tag = Tag{} + var Tamil Tag = Tag{} + var Telugu Tag = Tag{} + var Thai Tag = Tag{} + var TraditionalChinese Tag = Tag{} + var Turkish Tag = Tag{} + var Ukrainian Tag = Tag{} + var Und Tag = Tag{} + var Urdu Tag = Tag{} + var Uzbek Tag = Tag{} + var Vietnamese Tag = Tag{} + var Zulu Tag = Tag{} + func Compose(part ...interface{}) (t Tag, err error) + func Make(s string) Tag + func MatchStrings(m Matcher, lang ...string) (tag Tag, index int) + func MustParse(s string) Tag + func Parse(s string) (t Tag, err error) + func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) + func (t Tag) Base() (Base, Confidence) + func (t Tag) Extension(x byte) (ext Extension, ok bool) + func (t Tag) Extensions() []Extension + func (t Tag) IsRoot() bool + func (t Tag) Parent() Tag + func (t Tag) Raw() (b Base, s Script, r Region) + func (t Tag) Region() (Region, Confidence) + func (t Tag) Script() (Script, Confidence) + func (t Tag) SetTypeForKey(key, value string) (Tag, error) + func (t Tag) String() string + func (t Tag) TypeForKey(key string) string + func (t Tag) Variants() []Variant + type ValueError struct + func (e ValueError) Error() string + func (e ValueError) Subtag() string + type Variant struct + func ParseVariant(s string) (Variant, error) + func (v Variant) String() string