Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 2,747 for tmpl (0.12 sec)

  1. src/html/template/content_test.go

    func TestStringer(t *testing.T) {
    	s := &myStringer{3}
    	b := new(strings.Builder)
    	tmpl := Must(New("x").Parse("{{.}}"))
    	if err := tmpl.Execute(b, s); err != nil {
    		t.Fatal(err)
    	}
    	var expect = "string=3"
    	if b.String() != expect {
    		t.Errorf("expected %q got %q", expect, b.String())
    	}
    	e := &errorer{7}
    	b.Reset()
    	if err := tmpl.Execute(b, e); err != nil {
    		t.Fatal(err)
    	}
    	expect = "error=7"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:48:16 UTC 2022
    - 13.5K bytes
    - Viewed (0)
  2. pkg/ctrlz/topics/env.go

    	}
    
    	return result
    }
    
    func (envTopic) Activate(context fw.TopicContext) {
    	tmpl := assets.ParseTemplate(context.Layout(), "templates/env.html")
    
    	_ = context.HTMLRouter().StrictSlash(true).NewRoute().Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		fw.RenderHTML(w, tmpl, getVars())
    	})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. pkg/ctrlz/topics/mem.go

    	return "mem"
    }
    
    func (memTopic) Activate(context fw.TopicContext) {
    	tmpl := assets.ParseTemplate(context.Layout(), "templates/mem.html")
    
    	_ = context.HTMLRouter().StrictSlash(true).NewRoute().Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		ms := &runtime.MemStats{}
    		runtime.ReadMemStats(ms)
    		fw.RenderHTML(w, tmpl, ms)
    	})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. src/text/template/parse/parse_test.go

    			"break": func(in any) any { return in },
    		}
    		tmpl, err := New("").Parse(inp, "", "", make(map[string]*Tree), funcsWithKeywordFunc)
    		if err != nil || tmpl == nil {
    			t.Errorf("with break func: unexpected error: %v", err)
    		}
    	}
    
    	{
    		// No function called 'break'; treat it as a keyword. Results in a parse
    		// error.
    		tmpl, err := New("").Parse(inp, "", "", make(map[string]*Tree), make(map[string]any))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 24K bytes
    - Viewed (0)
  5. pkg/test/framework/components/istio/eastwest.go

    	"istio.io/istio/pkg/test/env"
    	"istio.io/istio/pkg/test/framework/components/cluster"
    	"istio.io/istio/pkg/test/scopes"
    	"istio.io/istio/pkg/test/util/retry"
    	"istio.io/istio/pkg/test/util/tmpl"
    )
    
    const (
    	eastWestIngressIstioNameLabel = "eastwestgateway"
    	eastWestIngressIstioLabel     = "istio=" + eastWestIngressIstioNameLabel
    	eastWestIngressServiceName    = "istio-" + eastWestIngressIstioNameLabel
    )
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Nov 10 02:30:20 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  6. pkg/test/framework/components/echo/config/source.go

    		return nil, err
    	}
    
    	tpl, err := tmpl.Parse(raw)
    	if err != nil {
    		return nil, err
    	}
    	return param.Parse(tpl), nil
    }
    
    func (s sourceImpl) TemplateOrFail(t test.Failer) *param.Template {
    	t.Helper()
    	tpl, err := s.Template()
    	if err != nil {
    		t.Fatal(err)
    	}
    	return tpl
    }
    
    func (s sourceImpl) MustTemplate() *param.Template {
    	tpl, err := s.Template()
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  7. pkg/ctrlz/topics/proc.go

    	return &pi
    }
    
    func (procTopic) Activate(context fw.TopicContext) {
    	tmpl := assets.ParseTemplate(context.Layout(), "templates/proc.html")
    
    	_ = context.HTMLRouter().StrictSlash(true).NewRoute().Path("/").HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		fw.RenderHTML(w, tmpl, getProcInfo())
    	})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. tests/integration/security/https_jwt/main_test.go

    	"istio.io/istio/pkg/test/framework/components/jwt"
    	"istio.io/istio/pkg/test/framework/components/namespace"
    	"istio.io/istio/pkg/test/framework/label"
    	"istio.io/istio/pkg/test/framework/resource"
    	"istio.io/istio/pkg/test/util/tmpl"
    	"istio.io/istio/tests/integration/security/util/cert"
    )
    
    var (
    	ist       istio.Instance
    	apps      deployment.SingleNamespaceView
    	jwtServer jwt.Server
    	echoNS    namespace.Instance
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jan 17 09:55:58 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. cmd/gotemplate/gotemplate.go

    	}
    
    	funcMap := template.FuncMap{
    		"include": include,
    		"indent":  indent,
    		"trim":    trim,
    	}
    
    	tmpl, err := template.New("").Funcs(funcMap).Parse(buf.String())
    	if err != nil {
    		return fmt.Errorf("parsing input as text template: %v", err)
    	}
    
    	if err := tmpl.Execute(out, data); err != nil {
    		return fmt.Errorf("generating result: %v", err)
    	}
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 22 18:39:23 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  10. src/text/template/helper.go

    		//  t, err := New(name).Funcs(xxx).ParseFiles(name)
    		// works. Otherwise we create a new template associated with t.
    		var tmpl *Template
    		if t == nil {
    			t = New(name)
    		}
    		if name == t.Name() {
    			tmpl = t
    		} else {
    			tmpl = t.New(name)
    		}
    		_, err = tmpl.Parse(s)
    		if err != nil {
    			return nil, err
    		}
    	}
    	return t, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:54:08 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top