- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for ParseFiles (0.18 sec)
-
src/text/template/helper.go
// the last one mentioned will be the one that results. // For instance, ParseFiles("a/foo", "b/foo") stores "b/foo" as the template // named "foo", while "a/foo" is unavailable. func ParseFiles(filenames ...string) (*Template, error) { return parseFiles(nil, readFileOS, filenames...) } // ParseFiles parses the named files and associates the resulting templates with
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:54:08 UTC 2024 - 6.4K bytes - Viewed (0) -
src/html/template/template.go
// // ParseFiles returns an error if t or any associated template has already been executed. func (t *Template) ParseFiles(filenames ...string) (*Template, error) { return parseFiles(t, readFileOS, filenames...) } // parseFiles is the helper for the method and function. If the argument // template is nil, it is created from the first file.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 21:00:46 UTC 2024 - 17K bytes - Viewed (0) -
src/go/types/check_test.go
) var ( haltOnError = flag.Bool("halt", false, "halt on error") verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual") ) var fset = token.NewFileSet() func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode parser.Mode) ([]*ast.File, []error) { var files []*ast.File var errlist []error for i, filename := range filenames {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0) -
src/text/template/template.go
for _, v := range t.tmpl { m = append(m, v) } return m } // Delims sets the action delimiters to the specified strings, to be used in // subsequent calls to [Template.Parse], [Template.ParseFiles], or [Template.ParseGlob]. Nested template // definitions will inherit the settings. An empty delimiter stands for the // corresponding default: {{ or }}. // The return value is the template, so calls can be chained.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 7.2K bytes - Viewed (0) -
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/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)