// Must panics if err is non-nil or if win is nil. Otherwise, win is returned.
327699
func Must(win *Window, err error) *Window {
	if err != nil {
		panic(err)
	}
	if win == nil {
		panic("win and err are nil")
	}
	return win
}
431453
func MustNewLexer(config *Config, rules Rules) *RegexLexer {
	lexer, err := NewLexer(config, rules)
	if err != nil {
		panic(err)
	}
	return lexer
}
657768
func Panic(err error, message string, args ...interface{}) {
	if err != nil {
		logger.Printf(message+"\n", args...)
		panic(err)
	}
}
293582
func MustAst(x interface{}) []byte {
	bs, err := Ast(x)
	if err != nil {
		panic(err)
	}
	return bs
}
344818
func MustParseStatement(input string) Statement {
	parsed, err := ParseStatement(input)
	if err != nil {
		panic(err)
	}
	return parsed
}
1085573
func MustParseStatement(s string) Statement {
	stmt, err := ParseStatement(s)
	if err != nil {
		panic(err.Error())
	}
	return stmt
}
872096
func MustSub(b []uint32, rh []uint32) {
	if len(b) != len(rh) {
		panic(ErrUnequallySizedSlices)
	}

	noborrow := true

	for i := range b {
		v, c := FullAdd(b[i], ^rh[i], noborrow)
		b[i] = uint32(v)
		noborrow = c
	}

	if !noborrow {
		panic(ErrSubtractionWithLeftovers)
	}
}
436798
func MustParse(v string) *Version {
	sv, err := NewVersion(v)
	if err != nil {
		panic(err)
	}
	return sv
}
766689
func MustParseMessage(line string) *Message {
	m, err := ParseMessage(line)
	if err != nil {
		panic(err.Error())
	}
	return m
}
545333
func Must(tpl *Template, err error) *Template {
	if err != nil {
		panic(err)
	}
	return tpl
}
756183
func MustDuration(input interface{}) time.Duration {
	output, err := Duration(input)
	if err != nil {
		panic(err)
	}
	return output
}
355590
func (d *Decoder) MustDecode(v interface{}) {
	if d.err != nil {
		panic(d.err)
	}
	d.mustDecode(v)
}
1267886
func panicToError(err *error) {
	if r := recover(); r != nil {
		switch t := r.(type) {
		case string:
			*err = errors.New(t)
		case error:
			*err = t
		default: // panic again if we don't know how to handle
			panic(r)
		}
	}
}
23568
func (d *DefaultLoader) MustValidate(conf interface{}) {
	if err := d.Validate(conf); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(2)
	}
}
717266
func (enc *Encoding) MustRandom(n int) string {
	s, err := enc.Random(n)
	if err != nil {
		panic(err)
	}
	return s
}
1282582
func Must(def Definition, err error) Definition {
	if err != nil {
		panic(err)
	}
	return def
}
1184911
func (g *PCPGauge) MustDec(val float64) {
	if err := g.Dec(val); err != nil {
		panic(err)
	}
}