// CustomFunc renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.
493908
func (g *Group) CustomFunc(options Options, f func(*Group)) *Statement {
	s := CustomFunc(options, f)
	g.items = append(g.items, s)
	return s
}
275399
func (r *Route) OptionsFunc(f http.HandlerFunc) *Route {
	return r.Options(http.HandlerFunc(f))
}
266601
func (b *UpdateBuilder) AddFunc(column string, fn *Func) *UpdateBuilder {
	return b.addValue(column, fn)
}
627428
func TemplateFunc(name string, f interface{}) TemplateOption {
	return func(g Generator, t *template.Template) *template.Template {
		return t.Funcs(template.FuncMap{name: curryGenerator(f, g)})
	}
}
1636
func (g *Group) IndexFunc(f func(*Group)) *Statement {
	s := IndexFunc(f)
	g.items = append(g.items, s)
	return s
}
197486
func (n *Negroni) UseFunc(handlerFunc func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)) {
	n.Use(HandlerFunc(handlerFunc))
}
881964
func (b *Bundle) Tfunc(pref string, prefs ...string) (TranslateFunc, error) {
	tfunc, _, err := b.TfuncAndLanguage(pref, prefs...)
	return tfunc, err
}
67750
func (c *Card) CustomFields(boardCustomFields []*CustomField) map[string]interface{} {

	cfm := c.customFieldMap

	if cfm == nil {
		cfm = &(map[string]interface{}{})

		// bcfOptionNames[CustomField ID] = Custom Field Name
		bcfOptionNames := map[string]string{}

		// bcfOptionsMap[CustomField ID][ID of the option] = Value of the option
		bcfOptionsMap := map[string]map[string]interface{}{}

		for _, bcf := range boardCustomFields {
			bcfOptionNames[bcf.ID] = bcf.Name
			for _, cf := range bcf.Options {
				// create 2nd level map when not available yet
				map2, ok := bcfOptionsMap[cf.IDCustomField]
				if !ok {
					map2 = map[string]interface{}{}
					bcfOptionsMap[bcf.ID] = map2
				}

				bcfOptionsMap[bcf.ID][cf.ID] = cf.Value.Text
			}
		}

		for _, cf := range c.CustomFieldItems {
			name := bcfOptionNames[cf.IDCustomField]

			// create 2nd level map when not available yet
			map2, ok := bcfOptionsMap[cf.IDCustomField]
			if !ok {
				continue
			}
			value, ok := map2[cf.IDValue]

			if ok {
				(*cfm)[name] = value
			}
		}
		c.customFieldMap = cfm
	}
	return *cfm
}
611332
func (g *Group) BlockFunc(f func(*Group)) *Statement {
	s := BlockFunc(f)
	g.items = append(g.items, s)
	return s
}
104255
func (win *Window) Custom(state nstyle.WidgetStates) (bounds rect.Rect, out *command.Buffer) {
	var s bool

	if s, bounds, _ = win.widget(); !s {
		return
	}
	prevstate := win.widgets.PrevState(bounds)
	exitstate := basicWidgetStateControl(&prevstate, win.inputMaybe(s), bounds)
	if state != nstyle.WidgetStateActive {
		state = exitstate
	}
	win.widgets.Add(state, bounds)
	return bounds, &win.cmds
}
1141860
func (alias *AliasPackage) AddFunc(decl *ast.FuncDecl) (err error) {

	if decl == nil {
		err = errUnexpectedNil
		return
	}

	paramNames := collection.AsEnumerable(decl.Type.Params.List)
	paramNames = collection.SelectMany(paramNames, func(x interface{}) collection.Enumerator {
		return collection.AsEnumerable(x.(*ast.Field).Names).Enumerate(nil)
	})

	arguments := []ast.Expr{}

	for n := range paramNames.Enumerate(nil) {
		arguments = append(arguments, n.(*ast.Ident))
	}

	decl.Body = &ast.BlockStmt{
		List: []ast.Stmt{
			&ast.ReturnStmt{
				Results: []ast.Expr{
					&ast.CallExpr{
						Fun: &ast.SelectorExpr{
							X: &ast.Ident{
								Name: origImportAlias,
							},
							Sel: &ast.Ident{
								Name: decl.Name.Name,
							},
						},
						Args: arguments,
					},
				},
			},
		},
	}

	targetFile := alias.ModelFile()

	targetFile.Decls = append(targetFile.Decls, decl)

	return
}
838499
func WrapFunc(handlerFunc http.HandlerFunc) Handler {
	return HandlerFunc(func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
		handlerFunc(rw, r)
		next(rw, r)
	})
}
1237736
func WithNameFunc(fn func(string) string) Option {
	return func(opt *options) {
		opt.nameFunc = fn
	}
}
1060882
func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) {
	return func(w io.Writer, a ...interface{}) {
		c.Fprintln(w, a...)
	}
}
305625
func (set StringSet) ApplyFunc(applyFn func(string) string) StringSet {
	nset := NewStringSet()
	for k := range set {
		nset.Add(applyFn(k))
	}
	return nset
}
834908
func (g *Group) PrintFunc(f func(*Group)) *Statement {
	s := PrintFunc(f)
	g.items = append(g.items, s)
	return s
}
741920
func errorFunc(server string, w dns.ResponseWriter, r *dns.Msg, rc int) {
	state := request.Request{W: w, Req: r}

	answer := new(dns.Msg)
	answer.SetRcode(r, rc)
	state.SizeAndDo(answer)

	w.WriteMsg(answer)
}