// Must panics if err is not nil, otherwise it returns g.
494462
func Must(g T, err error) T {
	if err != nil {
		panic(err)
	}
	return g
}
573544
func MustDecodeGTID(s string) GTID {
	gtid, err := DecodeGTID(s)
	if err != nil {
		panic(err)
	}
	return gtid
}
1135935
func (r *Reference) MustGet() interface{} {
	value, err := r.Get()
	if err != nil {
		panic(fmt.Sprintf("error returned from Get: %s", err))
	}
	return value
}
592383
func MustParse(s string) Version {
	v, err := Parse(s)
	if err != nil {
		panic(`semver: Parse(` + s + `): ` + err.Error())
	}
	return v
}
726020
func (tu Unit) MustCount(d time.Duration) int {
	c, err := tu.Count(d)
	if err != nil {
		panic(err)
	}

	return c
}
344687
func (h *PCPHistogram) MustRecord(val int64) {
	if err := h.Record(val); err != nil {
		panic(err)
	}
}
757992
func MustCompile(sel string) Selector {
	compiled, err := Compile(sel)
	if err != nil {
		panic(err)
	}
	return compiled
}
1036383
func MustInt(input interface{}) int64 {
	output, err := Int(input)
	if err != nil {
		panic(err)
	}
	return output
}
1290448
func (c *PCPClient) MustRegister(m Metric) {
	if err := c.Register(m); err != nil {
		panic(err)
	}
}
279728
func MustGet(key string) string {
	v := os.Getenv(key)
	if v == "" {
		panic("Environment variable " + key + " does not exist.")
	}

	return v
}
289754
func MustCompile(str string) *regexp.Regexp {
	re, err := regexpContainer.Get(str)
	if err != nil {
		// regexp.MustCompile() like message
		panic(`regexpcache: Compile(` + quote(str) + `): ` + err.Error())
	}
	return re
}
567232
func mustRegisterGWHandler(register registerFunc, ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) {
	err := register(ctx, mux, endpoint, opts)
	if err != nil {
		panic(err)
	}
}
236236
func MustLoad(filenames ...string) {
	err := Load(filenames...)
	if err != nil {
		panic(err.Error())
	}
}
550204
func MustParse(args ...string) Value {
	v, err := Parse(args...)
	if err != nil {
		panic(err)
	}
	return v
}
1322570
func (f *Value) MustGet() interface{} {
	value, err := f.Get()
	if err != nil {
		panic(fmt.Sprintf("get returned error: %s", err))
	}
	return value
}
698888
func MustCommand(v interface{}) *exec.Cmd {
	if command, err := Command(v); err == nil {
		return command
	} else {
		panic(err.Error())
	}
}
406234
func must(t *testing.T, err error) {
	if err == nil {
		return
	}
	if t == nil {
		log.Println(err)
	}
	t.Error(err)
}