1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed.
8 // It simplifies safe initialization of Tag values.
9 func MustParse(s string) Tag {
17 // MustParseBase is like ParseBase, but panics if the given base cannot be parsed.
18 // It simplifies safe initialization of Base values.
19 func MustParseBase(s string) Language {
20 b, err := ParseBase(s)
27 // MustParseScript is like ParseScript, but panics if the given script cannot be
28 // parsed. It simplifies safe initialization of Script values.
29 func MustParseScript(s string) Script {
30 scr, err := ParseScript(s)
37 // MustParseRegion is like ParseRegion, but panics if the given region cannot be
38 // parsed. It simplifies safe initialization of Region values.
39 func MustParseRegion(s string) Region {
40 r, err := ParseRegion(s)
47 // Und is the root language.