// MustString returns request form as string with default
491257
func (f *Forms) MustString(key string, defaults ...string) string {
	if v := (*http.Request)(f).FormValue(key); len(v) > 0 {
		return v
	}
	if len(defaults) > 0 {
		return defaults[0]
	}
	return ""
}
516826
func MustPathConfig(ctx context.Context) *types.PathConfig {
	return ctx.Value(PathConfigKey).(*types.PathConfig)
}
509160
func ToString(data interface{}) string {
	switch typed := data.(type) {
	case string:
		return typed
	case fmt.Stringer:
		return typed.String()
	default:
		return string(ToBytes(data))
	}
}
826237
func (c *secureCookies) MustString(key string, defaults ...string) string {
	ck, err := c.req.Cookie(key)
	if err != nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return ""
	}
	s := parseSecureCookie(c.secret, ck.Value)
	return s
}
1148997
func (c *cookies) MustString(key string, defaults ...string) string {
	ck, err := c.req.Cookie(key)
	if err != nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return ""
	}
	return ck.Value
}
23533
func (r *Request) String() (string, error) {
	data, err := r.Bytes()
	if err != nil {
		return "", err
	}

	return string(data), nil
}
626932
func MustStringSlice(input interface{}) []string {
	output, err := StringSlice(input)
	if err != nil {
		panic(err)
	}
	return output
}
750732
func (f *Queries) MustStrings(key string, defaults ...[]string) []string {
	(*http.Request)(f).ParseMultipartForm(32 << 20)
	if v, ok := f.Values()[key]; ok {
		return v
	}
	if len(defaults) > 0 {
		return defaults[0]
	}
	return []string{}
}
1053308
func (c *PCPClient) MustRegisterString(str string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) Metric {
	if m, err := c.RegisterString(str, val, t, s, u); err != nil {
		panic(err)
	} else {
		return m
	}
}
110410
func (s *Session) MustGet(key string) interface{} {
	if value, exists := s.Get(key); exists {
		return value
	}

	panic("Key \"" + key + "\" does not exist")
}
811047
func (b *HttpRequest) String() (string, error) {
	data, err := b.Bytes()
	if err != nil {
		return "", err
	}

	return string(data), nil
}
537133
func (ctx *Context) FormStrings(key string, defaults ...[]string) []string {
	return (*Forms)(ctx.req).MustStrings(key, defaults...)
}
1134910
func ApplyString(in string, out io.Writer, request *http.Request) error {
	t, err := template.New("t").Parse(in)
	if err != nil {
		return err
	}

	if err = t.Execute(out, data{request}); err != nil {
		return err
	}

	return nil
}
573985
func (w *ByteWriter) MustWriteString(val string, offset int) int {
	if off, err := w.WriteString(val, offset); err != nil {
		panic(err)
	} else {
		return off
	}
}
652920
func (j *Json) MustStringArray(args ...[]string) []string {
	var def []string

	switch len(args) {
	case 0:
	case 1:
		def = args[0]
	default:
		log.Panicf("MustStringArray() received too many arguments %d", len(args))
	}

	a, err := j.StringArray()
	if err == nil {
		return a
	}

	return def
}
1106488
func (f *Forms) MustStrings(key string, defaults ...[]string) []string {
	(*http.Request)(f).ParseMultipartForm(32 << 20)
	if v, ok := (*http.Request)(f).Form[key]; ok {
		return v
	}
	if len(defaults) > 0 {
		return defaults[0]
	}
	return []string{}
}
69378
func (p *Params) MustEscape(key string, defaults ...string) string {
	if len(key) == 0 {
		return ""
	}
	if key[0] != ':' && key[0] != '*' {
		key = ":" + key
	}

	for _, v := range *p {
		if v.Name == key {
			return template.HTMLEscapeString(v.Value)
		}
	}
	if len(defaults) > 0 {
		return defaults[0]
	}
	return ""
}