// goodParamFuncName reports whether the function name is a valid identifier.
188969
func goodParamFuncName(name string) bool {
	if name == "" {
		return false
	}
	// valid names are only letters and _
	for _, r := range name {
		switch {
		case r == '_':
		case !unicode.IsLetter(r):
			return false
		}
	}
	return true
}
1103209
func Param() HandlerFunc {
	return func(ctx *Context) {
		if action := ctx.Action(); action != nil {
			if p, ok := action.(Paramer); ok {
				p.SetParams(*ctx.Params())
			}
		}
		ctx.Next()
	}
}
238179
func (s *ListVersionsByFunctionInput) SetFunctionName(v string) *ListVersionsByFunctionInput {
	s.FunctionName = &v
	return s
}
479546
func (fn ScriptFunction) Param(name string, value interface{}) ScriptFunction {
	fn.params[name] = value
	return fn
}
873747
func (s *InvokeInput) SetFunctionName(v string) *InvokeInput {
	s.FunctionName = &v
	return s
}
246609
func (fn LinearDecayFunction) FieldName(fieldName string) LinearDecayFunction {
	fn.fieldName = fieldName
	return fn
}
636452
func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {
	if strings.Contains(name, "_") {
		return pflag.NormalizedName(strings.Replace(name, "_", "-", -1))
	}
	return pflag.NormalizedName(name)
}
1150688
func (g *Generator) FuncParams(f interface{}) (ParamSet, error) {
	signature, err := g.funcSignature(f)
	if err != nil {
		return nil, fmt.Errorf("failed to get func %+v signature", f)
	}

	paramSet := g.makeParamSet(g.defaultParamsPrefix, signature.Params())
	if signature.Variadic() {
		paramSet[len(paramSet)-1].Variadic = true
	}

	return paramSet, nil
}
444488
func CallFunc(getFuncByName func(string) (interface{}, bool), funcName string, params ...interface{}) ([]reflect.Value, error) {
	fn, ok := getFuncByName(funcName)
	if !ok {
		return nil, errors.New("no func found: " + funcName)
	}
	f := reflect.ValueOf(fn)
	if len(params) != f.Type().NumIn() {
		return nil, errors.New("parameter mismatched")
	}
	in := make([]reflect.Value, len(params))
	for k, param := range params {
		in[k] = reflect.ValueOf(param)
	}
	return f.Call(in), nil
}
1002252
func validName(name string) bool {
	for _, r := range name {
		if !unicode.IsPrint(r) {
			return false
		}
	}
	return name != "" &&
		name != "." &&
		name != ".." &&
		!strings.ContainsAny(name, `/\`)
}
1080482
func Fn(name string, paramNames ...string) *Func {
	return &Func{
		Name:       name,
		ParamNames: paramNames,
	}
}
1214117
func (s *CreateAliasInput) SetFunctionName(v string) *CreateAliasInput {
	s.FunctionName = &v
	return s
}
919454
func (s *GetFunctionConfigurationInput) SetFunctionName(v string) *GetFunctionConfigurationInput {
	s.FunctionName = &v
	return s
}
904136
func (s *ClusterParameterStatus) SetParameterName(v string) *ClusterParameterStatus {
	s.ParameterName = &v
	return s
}
236731
func (s *UpdateUserDefinedFunctionInput) SetFunctionName(v string) *UpdateUserDefinedFunctionInput {
	s.FunctionName = &v
	return s
}
456378
func (s *UpdateFunctionConfigurationInput) SetFunctionName(v string) *UpdateFunctionConfigurationInput {
	s.FunctionName = &v
	return s
}
1128206
func (s *RemovePermissionInput) SetFunctionName(v string) *RemovePermissionInput {
	s.FunctionName = &v
	return s
}