// ParamOk returns the value of a param and a boolean that indicates if the param exists.
514120
func (c *ctx) ParamOk(key string) (string, bool) {
	for _, p := range c.params {
		if p.key == key {
			return p.val, true
		}
	}

	return "", false
}
1296759
func (config StickerConfig) params() (map[string]string, error) {
	params, _ := config.BaseFile.params()

	return params, nil
}
1003779
func (s *Script) Params(params map[string]interface{}) *Script {
	s.params = params
	return s
}
3593
func (cmd *CLI) Param(name string) values.Value {
	value, ok := cmd.Params()[name]
	if !ok {
		panic(fmt.Sprintf("param not defined %v", name))
	}
	return value
}
1150303
func (r *Request) Param(key, value string) *Request {
	r.params[key] = value
	return r
}
980384
func params(params *cli.Context) []string {
	argsN := params.NArg()
	if argsN > 0 {
		var args []string
		for i := 0; i <= argsN-1; i++ {
			args = append(args, params.Args().Get(i))
		}
		return args
	}
	return nil
}
50485
func (options *Options) Param(pos int) interface{} {
	if len(options.params) > pos {
		return options.params[pos]
	}

	return nil
}
36383
func (m *SafeMap) Check(k interface{}) bool {
	m.lock.RLock()
	defer m.lock.RUnlock()
	if _, ok := m.bm[k]; !ok {
		return false
	}
	return true
}
355736
func (s *CodeGenNodeArg) SetParam(v bool) *CodeGenNodeArg {
	s.Param = &v
	return s
}
1017887
func (c *ctx) Param(key string) string {
	val, _ := c.ParamOk(key)
	return val
}
943998
func Param(i interface{}) string {
	switch v := i.(type) {
	case string:
		return v
	case []string:
		return strings.Join(v, ",")
	case int:
		return strconv.Itoa(v)
	case []int:
		return slices.Ints(v).Join("", ",")
	case uint:
		return strconv.FormatUint(uint64(v), 10)
	case []uint:
		return slices.Uints(v).Join("", ",")
	case []byte:
		return string(v)
	}

	panic("Only support int, []int, uint, []uint, string, []string, []byte")
}
64237
func (ctx *Context) ParamUint32(key string, defaults ...uint32) uint32 {
	return ctx.Params().MustUint32(key, defaults...)
}
340890
func (r *Request) ParamPresent(key string) *Request {
	r.MatchParam(key, ".*")
	return r
}
735385
func (v *volume) Params() (VolumeParams, bool) {
	if v.doc.Params == nil {
		return VolumeParams{}, false
	}
	return *v.doc.Params, true
}
1367100
func (r *Report) AddParam(k string, v interface{}) {
	r.Request.Params[k] = v
}
933386
func GetBoolQueryParam(c *gin.Context, value *bool, queryParam string, defaultValue bool) bool {
	var err error
	if c.Query(queryParam) != "" {
		if *value, err = strconv.ParseBool(c.Query(queryParam)); err != nil {
			c.JSON(BuildRequestError(
				errors.New("query parameter '" + queryParam + "' value should be true or false (omit the key and default value '" + strconv.FormatBool(defaultValue) + "' will be applied)")),
			)
			return false
		}
	} else {
		*value = defaultValue
	}
	return true
}
606081
func (p *ctx) Param(key string) string {
	val, _ := p.ParamOk(key)
	return val
}