Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for addValueFuncs (0.43 sec)

  1. src/text/template/funcs.go

    func createValueFuncs(funcMap FuncMap) map[string]reflect.Value {
    	m := make(map[string]reflect.Value)
    	addValueFuncs(m, funcMap)
    	return m
    }
    
    // addValueFuncs adds to values the functions in funcs, converting them to reflect.Values.
    func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
    	for name, fn := range in {
    		if !goodName(name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  2. src/text/template/template.go

    // so calls can be chained.
    func (t *Template) Funcs(funcMap FuncMap) *Template {
    	t.init()
    	t.muFuncs.Lock()
    	defer t.muFuncs.Unlock()
    	addValueFuncs(t.execFuncs, funcMap)
    	addFuncs(t.parseFuncs, funcMap)
    	return t
    }
    
    // Lookup returns the template with the given name that is associated with t.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top