// makeParamSet takes a tuple of func params/results and returns ParamSet
// with types conversions applied and params names renamed according to prefix, i.e.
// if prefix is "p" then first param name will be p0. If prefix is "" no renaming
// is done.
12520
func (g *Generator) makeParamSet(prefix string, params *types.Tuple) ParamSet {
	ps := make(ParamSet, params.Len())

	numericParamCounter := 0

	for i := 0; i < params.Len(); i++ {
		param := params.At(i)
		name := param.Name()

		typeName := g.typeOf(param.Type())
		paramPrefix, ok := g.typesPrefixes[typeName]
		if !ok {
			paramPrefix = prefix
			numericParamCounter++
		}

		if paramPrefix != "" {
			if numericParamCounter <= 1 {
				name = paramPrefix
			} else {
				name = fmt.Sprintf("%s%d", paramPrefix, i)
			}
		}

		ps[i] = &Param{
			Name:         name,
			Type:         typeName,
			OriginalType: param.Type(),
		}
	}

	return ps
}
1309107
func (s *Service) GetConfigSets() *GetConfigSetsCall {
	c := &GetConfigSetsCall{s: s, urlParams_: make(gensupport.URLParams)}
	return c
}
499262
func makeParams(rt reflect.Type, rv reflect.Value) []interface{} {
	numFields := rt.NumField()
	params := make([]interface{}, 0, numFields)
	for i := 0; i < numFields; i++ {
		rtf := rt.Field(i)
		rvf := rv.Field(i)
		if rtf.Type.Kind() == reflect.Ptr {
			if rvf.IsNil() {
				break
			}
			rvf.Elem()
		}
		params = append(params, rvf.Interface())
	}

	return params
}
509702
func (p *StringParam) Set(s string) error {
	p.val = &s
	return nil
}
958690
func ParseSetName(elems []string, name string) (Set, error) {
	if len(name) == 0 {
		return zeroSet, nil
	}

	seps := strings.Split(name, ",")
	marked := make(map[string]struct{}, len(seps))
	for _, s := range seps {
		marked[strings.ToLower(s)] = struct{}{}
	}
	items := make([]string, 0, len(seps))

	value := uint64(0)
	for i, n := range elems {
		key := strings.ToLower(n)
		if _, ok := marked[key]; ok {
			value |= 1 << uint64(i)
			delete(marked, key)
			items = append(items, n)
		}
	}

	if len(marked) == 0 {
		return Set{Name: strings.Join(items, ","), Value: value}, nil
	}

	// name doesn't exist, maybe an integer?
	if num, err := strconv.ParseUint(name, 0, 64); err == nil {
		return ParseSetValue(elems, num)
	}

	return Set{}, errors.Errorf("item %s is not in Set %v", name, elems)
}
207138
func (r *Redis) ConfigSet(parameter, value string) error {
	rp, err := r.ExecuteCommand("CONFIG", "SET", parameter, value)
	if err != nil {
		return err
	}
	return rp.OKValue()
}
1026590
func (ctx *Context) ParamStrings(key string, defaults ...[]string) []string {
	return ctx.Params().MustStrings(key, defaults...)
}
816384
func (c *client) newParamMap(key string, value interface{}) map[string]string {
	ret := make(map[string]string, len(c.params)+1)
	for key, value := range c.params {
		ret[key] = value
	}
	jsonVal, _ := json.Marshal(value)
	ret[key] = string(jsonVal)
	return ret
}
550685
func (c *GetConfigSetsCall) ConfigSet(configSet string) *GetConfigSetsCall {
	c.urlParams_.Set("config_set", configSet)
	return c
}
535839
func NewStringSet(vs ...string) StringSet {
	s := &stringSet{make(map[string]struct{})}
	s.Add(vs...)
	return s
}
1299089
func (t *Task) Set(k string, v interface{}) *Task {
	t.Params[k] = v
	return t
}
811705
func Params(r *http.Request) map[string]string {
	v := r.Context().Value(routeParamsID)
	if v == nil {
		return map[string]string{}
	}
	if v, ok := v.(map[string]string); ok {
		return v
	}
	return map[string]string{}
}
1061713
func (s *ProjectService) NewCreateProjectParams(displaytext string, name string) *CreateProjectParams {
	p := &CreateProjectParams{}
	p.p = make(map[string]interface{})
	p.p["displaytext"] = displaytext
	p.p["name"] = name
	return p
}
142583
func (RouteGenerator) ParamNames() []generate.GeneratorParam {
	return []generate.GeneratorParam{
		{Name: "labels", Required: false},
		{Name: "default-name", Required: true},
		{Name: "port", Required: false},
		{Name: "name", Required: false},
		{Name: "hostname", Required: false},
		{Name: "path", Required: false},
		{Name: "wildcard-policy", Required: false},
	}
}
778255
func (m *ParamSet) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.PARAM_VALUE)
	binary.Read(data, binary.LittleEndian, &m.TARGET_SYSTEM)
	binary.Read(data, binary.LittleEndian, &m.TARGET_COMPONENT)
	binary.Read(data, binary.LittleEndian, &m.PARAM_ID)
	binary.Read(data, binary.LittleEndian, &m.PARAM_TYPE)
}
743381
func (u *User) PostParams() map[string]string {
	m := map[string]string{
		"name": u.Username,
	}

	return m
}
657069
func MakeParams(cmd *cobra.Command, params []GeneratorParam) map[string]interface{} {
	result := map[string]interface{}{}
	for ix := range params {
		f := cmd.Flags().Lookup(params[ix].Name)
		if f != nil {
			result[params[ix].Name] = f.Value.String()
		}
	}
	return result
}