// AddFuncs adds to values the functions in funcs. It does no checking of the input -
// call addValueFuncs first.
14492
func addFuncs(out, in FuncMap) {
	for name, fn := range in {
		out[name] = fn
	}
}
162799
func addConversionFuncs(scheme *runtime.Scheme) error {
	err := scheme.AddConversionFuncs(
		Convert_scheme_ScaleStatus_To_v1beta2_ScaleStatus,
		Convert_v1beta2_ScaleStatus_To_scheme_ScaleStatus,
	)
	if err != nil {
		return err
	}

	return nil
}
1239280
func (bv *Values) AddOnce(value interface{}) bool {
	return bv.addIfNotExists(reflect.ValueOf(value))
}
620234
func Funcs(d *data.Data) template.FuncMap {
	f := template.FuncMap{}
	funcs.AddDataFuncs(f, d)
	funcs.AWSFuncs(f)
	funcs.AddBase64Funcs(f)
	funcs.AddNetFuncs(f)
	funcs.AddReFuncs(f)
	funcs.AddStringFuncs(f)
	funcs.AddEnvFuncs(f)
	funcs.AddConvFuncs(f)
	funcs.AddTimeFuncs(f)
	funcs.AddMathFuncs(f)
	funcs.AddCryptoFuncs(f)
	funcs.AddFileFuncs(f)
	funcs.AddFilePathFuncs(f)
	funcs.AddPathFuncs(f)
	funcs.AddSockaddrFuncs(f)
	funcs.AddTestFuncs(f)
	funcs.AddCollFuncs(f)
	funcs.AddUUIDFuncs(f)
	funcs.AddRandomFuncs(f)
	return f
}
1244792
func AddStatusFuncs(fmap template.FuncMap) {
	statusMu.Lock()
	defer statusMu.Unlock()

	for name, fun := range fmap {
		if !strings.HasPrefix(name, "github_com_vitessio_vitess_") {
			panic("status func registered without proper prefix, need github_com_vitessio_vitess_:" + name)
		}
		if _, ok := statusFuncMap[name]; ok {
			panic("duplicate status func registered: " + name)
		}
		statusFuncMap[name] = fun
	}
}
19868
func (a *AsyncMultiTokenSink) AddEvents(ctx context.Context, events []*event.Event) (err error) {
	if token := ctx.Value(TokenCtxKey); token != nil {
		err = a.AddEventsWithToken(token.(string), events)
	} else {
		err = fmt.Errorf("no value was found on the context with key '%s'", TokenCtxKey)
	}
	return
}
1275160
func builtinFunc(name string) func(js JSWriter, args []ast.Node) {
	var funcStart = "soy.$$" + name + "("
	return func(js JSWriter, args []ast.Node) {
		js.Write(funcStart)
		for i, arg := range args {
			if i != 0 {
				js.Write(",")
			}
			js.Write(arg)
		}
		js.Write(")")
	}
}
1056555
func (mm *methodManager) AddFunctions(
	names []string, functions []interface{}, option ...Options) {
	count := len(names)
	if count != len(functions) {
		panic("names and functions must have the same length")
	}
	for i := 0; i < count; i++ {
		mm.AddFunction(names[i], functions[i], option...)
	}
}
683788
func (r Render) AddFromStringsFuncs(name string, funcMap template.FuncMap, templateStrings ...string) *template.Template {
	tmpl := template.New(name).Funcs(funcMap)

	for _, ts := range templateStrings {
		tmpl = template.Must(tmpl.Parse(ts))
	}

	r.Add(name, tmpl)
	return tmpl
}
769351
func (service *BaseService) AddFunctions(names []string, functions []interface{}, option ...Options) Service {
	service.methodManager.AddFunctions(names, functions, option...)
	return service
}
756599
func (c *Cron) AddFunc(spec string, cmd func()) error {
	return c.AddJob(spec, FuncJob(cmd))
}
495828
func (s *SingleStack) Add(fx func(interface{})) int {
	return s.FunctionStack.Add(func(f ...interface{}) {
		if len(f) <= 0 {
			fx(nil)
			return
		}

		fx(f[0])
	})
}
876342
func (f *Values) Add(key, val string) {
	f.values = append(f.values, formValue{key, val})
}
926902
func (h *Hooks) Add(f func()) {
	h.mu.Lock()
	defer h.mu.Unlock()
	h.funcs = append(h.funcs, f)
}
257633
func NewNullFunc(key Key, value bool) (Function, error) {
	return &nullFunc{key, value}, nil
}
211598
func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
	for name, fn := range in {
		v := reflect.ValueOf(fn)
		if v.Kind() != reflect.Func {
			panic("value for " + name + " not a function")
		}
		if !goodFunc(v.Type()) {
			panic(fmt.Errorf("can't install method/function %q with %d results", name, v.Type().NumOut()))
		}
		out[name] = v
	}
}
618357
func (d *Delta) AddPreconditions(fns ...PreconditionFunc) {
	d.preconditions = append(d.preconditions, fns...)
}