aboutsummaryrefslogtreecommitdiffstats
path: root/src/dma/vendor/golang.org/x/text/internal/language/tags.go
diff options
context:
space:
mode:
authorTomofumi Hayashi <tohayash@redhat.com>2019-04-27 20:38:39 +0900
committerTomofumi Hayashi <tohayash@redhat.com>2019-04-27 20:40:37 +0900
commit4d11ca17d0f73f5bd783f45900118295fdfed46b (patch)
treecce8575b02ac850d2b30ec12a5c4083c48e85c6c /src/dma/vendor/golang.org/x/text/internal/language/tags.go
parent07e4a96e4996f3d39b92dd601b3ed0d23bfbaa0c (diff)
barometer: update DMA's vendoring packages
Change-Id: I0578b094f1ecdaed20c906be2ba29d51b8089d7c Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
Diffstat (limited to 'src/dma/vendor/golang.org/x/text/internal/language/tags.go')
-rw-r--r--src/dma/vendor/golang.org/x/text/internal/language/tags.go48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/dma/vendor/golang.org/x/text/internal/language/tags.go b/src/dma/vendor/golang.org/x/text/internal/language/tags.go
new file mode 100644
index 00000000..e7afd318
--- /dev/null
+++ b/src/dma/vendor/golang.org/x/text/internal/language/tags.go
@@ -0,0 +1,48 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package language
+
+// MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed.
+// It simplifies safe initialization of Tag values.
+func MustParse(s string) Tag {
+ t, err := Parse(s)
+ if err != nil {
+ panic(err)
+ }
+ return t
+}
+
+// MustParseBase is like ParseBase, but panics if the given base cannot be parsed.
+// It simplifies safe initialization of Base values.
+func MustParseBase(s string) Language {
+ b, err := ParseBase(s)
+ if err != nil {
+ panic(err)
+ }
+ return b
+}
+
+// MustParseScript is like ParseScript, but panics if the given script cannot be
+// parsed. It simplifies safe initialization of Script values.
+func MustParseScript(s string) Script {
+ scr, err := ParseScript(s)
+ if err != nil {
+ panic(err)
+ }
+ return scr
+}
+
+// MustParseRegion is like ParseRegion, but panics if the given region cannot be
+// parsed. It simplifies safe initialization of Region values.
+func MustParseRegion(s string) Region {
+ r, err := ParseRegion(s)
+ if err != nil {
+ panic(err)
+ }
+ return r
+}
+
+// Und is the root language.
+var Und Tag