// MustLocalize is similar to Localize, except it panics if an error happens.
483290
func (l *Localizer) MustLocalize(lc *LocalizeConfig) string {
	localized, err := l.Localize(lc)
	if err != nil {
		panic(err)
	}
	return localized
}
860665
func MustGet(req *http.Request, param string) string {
	if !IsGet(req) {
		panic(InvalidMethodError{})
	}
	v := req.FormValue(param)
	if v == "" {
		panic(MissingParameterError(param))
	}
	return v
}
1133562
func (t *Translator) SetLocale(l string) error {
	err := t.AssertValidLocale(l)
	if err != nil {
		return err
	}

	err = t.loadResource(l)
	if err != nil {
		return err
	}

	t.locale = l

	return nil
}
1252175
func (s *CreateBotVersionOutput) SetLocale(v string) *CreateBotVersionOutput {
	s.Locale = &v
	return s
}
1017635
func (s *GetExclusionsPreviewInput) SetLocale(v string) *GetExclusionsPreviewInput {
	s.Locale = &v
	return s
}
520363
func (query Query) MustPreload(record interface{}, field string) {
	must(query.Preload(record, field))
}
822377
func (c *UsersInfoCall) IncludeLocale(includeLocale bool) *UsersInfoCall {
	c.includeLocale = includeLocale
	return c
}
757992
func MustCompile(sel string) Selector {
	compiled, err := Compile(sel)
	if err != nil {
		panic(err)
	}
	return compiled
}
756183
func MustDuration(input interface{}) time.Duration {
	output, err := Duration(input)
	if err != nil {
		panic(err)
	}
	return output
}
687526
func (d multiValidator) MustValidate(s interface{}) {
	if err := d.Validate(s); err != nil {
		panic(err)
	}
}
355590
func (d *Decoder) MustDecode(v interface{}) {
	if d.err != nil {
		panic(d.err)
	}
	d.mustDecode(v)
}
837021
func (s *DescribeFindingsInput) SetLocale(v string) *DescribeFindingsInput {
	s.Locale = &v
	return s
}
1001462
func RegisterLocale(loc *Locale) {
	old, ok := locales[loc.Locale]
	if ok {
		Copy(loc, old)
	} else {
		locales[loc.Locale] = loc
	}
}
666808
func (t *Translator) AssertValidLocale(l string) error {
	matched, err := regexp.MatchString("^(?:[a-z]{2}|[a-z]{2}(([_-]{1})([a-zA-Z]{2}){1,2}))$", l)
	if err != nil {
		return errors.New("unable to match locale code : " + err.Error())
	}
	if !matched {
		return errors.New("invalid locale code : " + l)
	}

	return nil
}
731975
func MustGetDialect(name string) Dialect {
	dialect, err := GetDialect(name)
	if err != nil {
		log.Panic(err)
	}
	return dialect
}
936156
func (m Map) MustJSON() string {
	result, err := m.JSON()
	if err != nil {
		panic(err.Error())
	}
	return result
}
655316
func MustParseLevel(s string) Level {
	lv, ok := ParseLevel(s)
	if !ok {
		panic(ErrUnrecognizedLogLevel.Error() + ": " + s)
	}
	return lv
}