// shortParam returns shorthand parameter notation in form "name type" without specifying type's import path
510125
func shortParam(param *types.Var) string {
	ret := param.Name()
	if ret != "" {
		ret += " "
	}
	return ret + shortType(param.Type())
}
75741
func ParamsStructFromJSON(value interface{}, shape *Shape, prefixPackageName bool) string {
	f := paramFiller{prefixPackageName: prefixPackageName}
	return util.GoFmt(f.paramsStructAny(value, shape))
}
24522
func (w *WebService) Param(parameter *Parameter) *WebService {
	if w.pathParameters == nil {
		w.pathParameters = []*Parameter{}
	}
	w.pathParameters = append(w.pathParameters, parameter)
	return w
}
840947
func WithParam(ctx context.Context, p, v string) context.Context {
	return context.WithValue(ctx, param(p), v)
}
1111685
func (fn ScriptFunction) Params(params map[string]interface{}) ScriptFunction {
	fn.params = params
	return fn
}
993506
func PathParam(req *http.Request, name string) (value string) {
	ex := getRequestExecution(req)
	return ex.params[name]
}
22576
func (c *Client) Param(name, value string) *Client {
	c.Use(url.Param(name, value))
	return c
}
1149250
func (m Method) ParamTypes() []string {
	sig := m.signature()
	types := m.listTypes(sig.Params())
	n := len(types)
	if n > 0 && sig.Variadic() {
		types[n-1] = strings.Replace(types[n-1], "[]", "...", 1)
	}
	return types
}
742156
func (ctx *Context) Param(key string, defaults ...string) string {
	return ctx.Params().MustString(key, defaults...)
}
743381
func (u *User) PostParams() map[string]string {
	m := map[string]string{
		"name": u.Username,
	}

	return m
}
1343711
func (r *Request) Param(name, value string) *Request {
	r.Use(url.Param(name, value))
	return r
}
14189
func (s *SiteInfo) Param(key interface{}) (interface{}, error) {
	keyStr, err := cast.ToStringE(key)
	if err != nil {
		return nil, err
	}
	keyStr = strings.ToLower(keyStr)
	return s.Params()[keyStr], nil
}
1219624
func Param(req *http.Request, paramName string) string {
	return req.URL.Query().Get(":" + paramName)
}
960955
func (s SearchParamInfo) CreateSearchParam(paramStr string) SearchParam {
	if ors := escapeFriendlySplit(paramStr, ','); len(ors) > 1 {
		return ParseOrParam(ors, s)
	}

	switch s.Type {
	case "composite":
		return ParseCompositeParam(paramStr, s)
	case "date":
		return ParseDateParam(paramStr, s)
	case "number":
		return ParseNumberParam(paramStr, s)
	case "quantity":
		return ParseQuantityParam(paramStr, s)
	case "reference":
		return ParseReferenceParam(paramStr, s)
	case "string":
		return ParseStringParam(paramStr, s)
	case "token":
		return ParseTokenParam(paramStr, s)
	case "uri":
		return ParseURIParam(paramStr, s)
	default:
		// Check for a custom search parameter
		if parser, err := GlobalRegistry().LookupParameterParser(s.Type); err == nil {
			data := SearchParamData{
				Modifier: s.Modifier,
				Chain:    s.Postfix,
				Prefix:   s.Prefix,
				Value:    paramStr,
			}
			param, err := parser(s, data)
			if err != nil {
				panic(createInternalServerError("MSG_PARAM_INVALID", fmt.Sprintf("Parameter \"%s\" content is invalid", s.Name)))
			}
			return param
		}
	}
	return nil
}
103402
func (ctx *Context) Param(key string) (val string) {
	if res, _ := ctx.Any(paramsKey); res != nil {
		val, _ = res.(map[string]string)[key]
	}
	return
}
152023
func (p *pageMeta) Param(key interface{}) (interface{}, error) {
	return resource.Param(p, p.s.Info.Params(), key)
}
1129035
func (b *RouteBuilder) Param(parameter *Parameter) *RouteBuilder {
	if b.parameters == nil {
		b.parameters = []*Parameter{}
	}
	b.parameters = append(b.parameters, parameter)
	return b
}