- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ExecuteTemplate (0.25 sec)
-
src/html/template/template.go
func (t *Template) Execute(wr io.Writer, data any) error { if err := t.escape(); err != nil { return err } return t.text.Execute(wr, data) } // ExecuteTemplate applies the template associated with t that has the given // name to the specified data object and writes the output to wr. // If an error occurs executing the template or writing its output,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 21:00:46 UTC 2024 - 17K bytes - Viewed (0) -
src/text/template/doc.go
A template may be executed directly or through [Template.ExecuteTemplate], which executes an associated template identified by name. To invoke our example above, we might write, err := tmpl.Execute(os.Stdout, "no data needed") if err != nil { log.Fatalf("execution failed: %s", err) } or to invoke a particular template explicitly by name, err := tmpl.ExecuteTemplate(os.Stdout, "T2", "no data needed") if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 17.9K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go
profile := getFromLegend(legend, "Type: ", "unknown") data.Title = file + " " + profile data.Errors = errList data.Total = rpt.Total() data.Legend = legend return getHTMLTemplates().ExecuteTemplate(dst, tmpl, data) } // render responds with html generated by passing data to the named template. func (ui *webInterface) render(w http.ResponseWriter, req *http.Request, tmpl string,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 14K bytes - Viewed (0) -
src/text/template/exec.go
panic(e) case writeError: *errp = err.Err // Strip the wrapper. case ExecError: *errp = err // Keep the wrapper. default: panic(e) } } } // ExecuteTemplate applies the template associated with t that has the given name // to the specified data object and writes the output to wr. // If an error occurs executing the template or writing its output,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
pilot/pkg/xds/bench_test.go
configName = input.Name } tmpl := template.Must(template.New("").Funcs(sprig.TxtFuncMap()).ParseFiles(path.Join("testdata", "benchmarks", configName+".yaml"))) var buf bytes.Buffer if err := tmpl.ExecuteTemplate(&buf, configName+".yaml", input); err != nil { t.Fatalf("failed to execute template: %v", err) } extra := path.Join("testdata", "benchmarks", configName+".extra.yaml") inputYAML := buf.String()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 22 18:13:40 UTC 2024 - 19.7K bytes - Viewed (0)