- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for ParseFiles (0.14 sec)
-
src/cmd/compile/internal/types2/check_test.go
. "cmd/compile/internal/types2" ) var ( haltOnError = flag.Bool("halt", false, "halt on error") verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual") ) func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode syntax.Mode) ([]*syntax.File, []error) { var files []*syntax.File var errlist []error errh := func(err error) { errlist = append(errlist, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 13.8K bytes - Viewed (0) -
src/html/template/examplefiles_test.go
// Here starts the example proper. // Let's just parse only dir1/T0 and dir2/T2 paths := []string{ filepath.Join(dir1, "T1.tmpl"), filepath.Join(dir2, "T2.tmpl"), } tmpl := template.Must(template.ParseFiles(paths...)) err := tmpl.Execute(os.Stdout, nil) if err != nil { log.Fatalf("template execution: %s", err) } // Output: // T1 invokes T2: (This is T2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 09 19:12:23 UTC 2020 - 7.5K bytes - Viewed (0) -
src/go/doc/doc_test.go
func readTemplate(filename string) *template.Template { t := template.New(filename) t.Funcs(template.FuncMap{ "node": nodeFmt, "synopsis": synopsisFmt, "indent": indentFmt, }) return template.Must(t.ParseFiles(filepath.Join(dataDir, filename))) } func nodeFmt(node any, fset *token.FileSet) string { var buf bytes.Buffer printer.Fprint(&buf, fset, node)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:52 UTC 2022 - 6.7K bytes - Viewed (0) -
src/text/template/doc.go
values, or must be copied with [Template.Clone] or [Template.AddParseTree]. Parse may be called multiple times to assemble the various associated templates; see [ParseFiles], [ParseGlob], [Template.ParseFiles] and [Template.ParseGlob] for simple ways to parse related templates stored in files. A template may be executed directly or through [Template.ExecuteTemplate], which executes
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 17.9K bytes - Viewed (0) -
pilot/pkg/xds/bench_test.go
return cached, k8sConfigCache[input] } configName := input.ConfigName if configName == "" { 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) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 22 18:13:40 UTC 2024 - 19.7K bytes - Viewed (0) -
src/html/template/escape_test.go
} else if buf.String() != "hello" { t.Errorf(`Expected "hello"; got %q`, buf.String()) } } // This is a test for issue 3272. func TestEmptyTemplateHTML(t *testing.T) { page := Must(New("page").ParseFiles(os.DevNull)) if err := page.ExecuteTemplate(os.Stdout, "page", "nothing"); err == nil { t.Fatal("expected error") } } type Issue7379 int func (Issue7379) SomeMethod(x int) string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 16 03:29:27 UTC 2023 - 56.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*Template).Name", Method, 0}, {"(*Template).New", Method, 0}, {"(*Template).Option", Method, 5}, {"(*Template).Parse", Method, 0}, {"(*Template).ParseFS", Method, 16}, {"(*Template).ParseFiles", Method, 0}, {"(*Template).ParseGlob", Method, 0}, {"(*Template).Templates", Method, 0}, {"CSS", Type, 0}, {"ErrAmbigContext", Const, 0}, {"ErrBadHTML", Const, 0}, {"ErrBranchEnd", Const, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
api/go1.txt
pkg html/template, func JSEscaper(...interface{}) string pkg html/template, func Must(*Template, error) *Template pkg html/template, func New(string) *Template pkg html/template, func ParseFiles(...string) (*Template, error) pkg html/template, func ParseGlob(string) (*Template, error) pkg html/template, func URLQueryEscaper(...interface{}) string pkg html/template, method (*Error) Error() string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)