// Param returns path parameter by name.
503889
func (c *xContext) Param(name string, defaults ...string) (value string) {
	l := len(c.pnames)
	for i, n := range c.pnames {
		if n == name && i < l {
			value = c.pvalues[i]
			break
		}
	}

	if len(value) == 0 && len(defaults) > 0 {
		return defaults[0]
	}
	return
}
838604
func (r *Request) MatchParam(key, value string) *Request {
	query := r.URLStruct.Query()
	query.Set(key, value)
	r.URLStruct.RawQuery = query.Encode()
	return r
}
1003779
func (s *Script) Params(params map[string]interface{}) *Script {
	s.params = params
	return s
}
355736
func (s *CodeGenNodeArg) SetParam(v bool) *CodeGenNodeArg {
	s.Param = &v
	return s
}
1134316
func (k *Client) Param(key string, value string) {
	k.QueryData.Add(key, value)

}
22576
func (c *Client) Param(name, value string) *Client {
	c.Use(url.Param(name, value))
	return c
}
3041
func Param(key, value string) p.Plugin {
	return p.NewRequestPlugin(func(ctx *c.Context, h c.Handler) {
		ctx.Request.URL.Path = replace(ctx.Request.URL.Path, key, value)
		h.Next(ctx)
	})
}
24117
func (k *Key) Params() backend.Params {
	return backend.Params{
		Content:    k.Content,
		Authority:  k.Authority,
		FormatSpec: config.FormatSpec{k.Formatter, k.FormatData},
	}
}
1296759
func (config StickerConfig) params() (map[string]string, error) {
	params, _ := config.BaseFile.params()

	return params, nil
}
1159800
func (b *Builder) NamespaceParam(namespace string) *Builder {
	b.namespace = namespace
	return b
}
654830
func (G *global_data) SetParam(key, value string) *global_data {
	if G.Req.Params == nil {
		G.Req.Params = make(map[string]string)
	}
	G.Req.Params[key] = value
	return G
}
703333
func (f *filesystemAttachment) Params() (FilesystemAttachmentParams, bool) {
	if f.doc.Params == nil {
		return FilesystemAttachmentParams{}, false
	}
	return *f.doc.Params, true
}
332850
func Parameter(markup ...trees.Appliable) *trees.Element {
	e := trees.NewElement("param", true)
	for _, m := range markup {
		m.Apply(e)
	}
	return e
}
1264955
func (p *parser) isParam() bool {
	return (p.isSexpr() || p.isHelperName()) && !p.isHashSegment()
}
679583
func (c *Ctx) Param(name string) string {

	for _, entry := range c.params {
		if entry.Key == name {
			return entry.Value
		}
	}

	return blank
}
632071
func (f *Field) SetParam(key string, value interface{}) FieldInterface {
	f.params[key] = value
	return f
}
1258444
func Parameter(r *http.Request, key string) string {
	params, ok := r.Context().Value(contextKeyParams).(map[string]string)
	if ok { // Parameters already parsed.
		return params[key]
	}
	paramsIdx, ok := r.Context().Value(contextKeyParamsIdx).(map[string]uint16)
	if !ok {
		return ""
	}
	params = make(map[string]string, len(paramsIdx))
	parts := splitPath(r.URL.Path)
	for name, idx := range paramsIdx {
		switch name {
		case "*":
			for idx < uint16(len(parts)) {
				params[name] += parts[idx]
				if idx < uint16(len(parts))-1 {
					params[name] += "/"
				}
				idx++
			}
		default:
			params[name] = parts[idx]
		}
	}
	*r = *r.WithContext(context.WithValue(r.Context(), contextKeyParams, params))
	return params[key]
}