// MustParseRef returns a parsed reference.
// If an error occurs during parsing, panic.
439023
func MustParseRef(input string) Ref {
	parsed, err := ParseRef(input)
	if err != nil {
		panic(err)
	}
	return parsed
}
817682
func MustParse(ulid string) ULID {
	id, err := Parse(ulid)
	if err != nil {
		panic(err)
	}
	return id
}
387203
func MustParse(s string) int64 {
	i, err := ParseBytesPerKB(s, 0 /*autodetect*/)
	if err != nil {
		panic(err)
	}
	return i
}
921641
func MustCompile(str string, opt RegexOptions) *Regexp {
	regexp, error := Compile(str, opt)
	if error != nil {
		panic(`regexp2: Compile(` + quote(str) + `): ` + error.Error())
	}
	return regexp
}
540623
func MustReadFrame(r io.Reader) Frame {
	f, err := ReadFrame(r)
	if err != nil {
		panic(err)
	}
	return f
}
608403
func MustCompile(expr string) *Expr {
	exp, err := Compile(expr)
	if err != nil {
		return nil
	}
	return exp
}
967558
func MustParse(v interface{}) []string {
	if command, err := Parse(v); err == nil {
		return command
	} else {
		panic(err.Error())
	}
}
854824
func MustParseConsistency(s string) (Consistency, error) {
	c, err := ParseConsistencyWrapper(s)
	if err != nil {
		panic(err)
	}
	return c, nil
}
1128252
func (p *Parser) parseRef() (Revisioner, error) {
	var tok, prevTok token
	var lit, buf string
	var endOfRef bool
	var err error

	for {
		tok, lit, err = p.scan()

		if err != nil {
			return nil, err
		}

		switch tok {
		case eof, at, colon, tilde, caret:
			endOfRef = true
		}

		err := p.checkRefFormat(tok, lit, prevTok, buf, endOfRef)

		if err != nil {
			return "", err
		}

		if endOfRef {
			p.unscan()
			return Ref(buf), nil
		}

		buf += lit
		prevTok = tok
	}
}
476149
func MustParse(datestr string) time.Time {
	p, err := parseTime(datestr, nil)
	if err != nil {
		panic(err.Error())
	}
	t, err := p.parse()
	if err != nil {
		panic(err.Error())
	}
	return t
}
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
}
592383
func MustParse(s string) Version {
	v, err := Parse(s)
	if err != nil {
		panic(`semver: Parse(` + s + `): ` + err.Error())
	}
	return v
}
276926
func MustParse(str string) Quantity {
	q, err := ParseQuantity(str)
	if err != nil {
		panic(fmt.Errorf("cannot parse '%v': %v", str, err))
	}
	return *q
}
202628
func MustCompileFrame(f Frame) []byte {
	bts, err := CompileFrame(f)
	if err != nil {
		panic(err)
	}
	return bts
}
563403
func MustParseGeneric(str string) *Version {
	v, err := ParseGeneric(str)
	if err != nil {
		panic(err)
	}
	return v
}
793807
func MustParse(rawurl string) *URL {
	u, err := Parse(rawurl)
	if err != nil {
		panic(err)
	}
	return u
}
1273229
func MustParsePlacement(directive string) *Placement {
	placement, err := ParsePlacement(directive)
	if err != nil {
		panic(err)
	}
	return placement
}