- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for parseGlob (0.15 sec)
-
src/text/template/helper.go
// the last one mentioned will be the one that results. func (t *Template) ParseGlob(pattern string) (*Template, error) { t.init() return parseGlob(t, pattern) } // parseGlob is the implementation of the function and method ParseGlob. func parseGlob(t *Template, pattern string) (*Template, error) { filenames, err := filepath.Glob(pattern) if err != nil { return nil, err
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
// the last one mentioned will be the one that results. // // ParseGlob returns an error if t or any associated template has already been executed. func (t *Template) ParseGlob(pattern string) (*Template, error) { return parseGlob(t, pattern) } // parseGlob is the implementation of the function and method ParseGlob. func parseGlob(t *Template, pattern string) (*Template, error) { if err := t.checkCanParse(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 21:00:46 UTC 2024 - 17K bytes - Viewed (0) -
src/html/template/multi_test.go
} func TestParseGlob(t *testing.T) { _, err := ParseGlob("DOES NOT EXIST") if err == nil { t.Error("expected error for non-existent file; got none") } _, err = New("error").ParseGlob("[x") if err == nil { t.Error("expected error for bad pattern; got none") } template := New("root") _, err = template.ParseGlob("testdata/file*.tmpl") if err != nil { t.Fatalf("error parsing files: %v", err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:48:16 UTC 2022 - 8K bytes - Viewed (0) -
src/text/template/multi_test.go
} func TestParseGlob(t *testing.T) { _, err := ParseGlob("DOES NOT EXIST") if err == nil { t.Error("expected error for non-existent file; got none") } _, err = New("error").ParseGlob("[x") if err == nil { t.Error("expected error for bad pattern; got none") } template := New("root") _, err = template.ParseGlob("testdata/file*.tmpl") if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 08 10:48:29 UTC 2022 - 11.7K bytes - Viewed (0) -
src/html/template/template_test.go
t.Errorf("ParseFiles: %v\nwanted error about already having Executed", err) } if _, err := c.root.ParseGlob("*.no.template"); err == nil || !strings.Contains(err.Error(), "Execute") { t.Errorf("ParseGlob: %v\nwanted error about already having Executed", err) } if _, err := c.root.AddParseTree("t1", c.root.Tree); err == nil || !strings.Contains(err.Error(), "Execute") {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:48:16 UTC 2022 - 6.2K bytes - Viewed (0) -
src/text/template/template.go
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/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) -
cni/pkg/log/uds_test.go
i := 0 for _, l := range gotLogs { var parsedLog map[string]any assert.NoError(t, json.Unmarshal([]byte(l), &parsedLog)) if parsedLog["scope"] != "cni-plugin" { // Each log is 2x: one direct, and one over UDS. Just test the UDS one continue } // remove scope since it is constant and not needed to test delete(parsedLog, "scope") // check time is there if _, f := parsedLog["time"]; !f {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 16:26:28 UTC 2024 - 4.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*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}, {"ErrEndContext", 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) -
tools/bug-report/pkg/processlog/processlog.go
func getTimeRange(logStr string, start, end time.Time) string { var sb strings.Builder write := false for _, l := range strings.Split(logStr, "\n") { t, _, _, valid := parseLog(l) if valid { write = false if (t.Equal(start) || t.After(start)) && (t.Equal(end) || t.Before(end)) { write = true } } if write { sb.WriteString(l) sb.WriteString("\n") }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 19 21:44:33 UTC 2023 - 4.4K bytes - Viewed (0)