summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/text/language/language.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/text/language/language.go')
-rw-r--r--vendor/golang.org/x/text/language/language.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/golang.org/x/text/language/language.go b/vendor/golang.org/x/text/language/language.go
index abfa17f6..289b3a36 100644
--- a/vendor/golang.org/x/text/language/language.go
+++ b/vendor/golang.org/x/text/language/language.go
@@ -412,6 +412,10 @@ func (t Tag) Extensions() []Extension {
// are of the allowed values defined for the Unicode locale extension ('u') in
// https://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers.
// TypeForKey will traverse the inheritance chain to get the correct value.
+//
+// If there are multiple types associated with a key, only the first will be
+// returned. If there is no type associated with a key, it returns the empty
+// string.
func (t Tag) TypeForKey(key string) string {
if !compact.Tag(t).MayHaveExtensions() {
if key != "rg" && key != "va" {