Lines Matching refs:pattern
95 // files identified by the pattern, which must match at least one file. The
97 // first file matched by the pattern. ParseGlob is equivalent to calling
98 // ParseFiles with the list of files matched by the pattern.
102 func ParseGlob(pattern string) (*Template, error) {
103 return parseGlob(nil, pattern)
107 // pattern and associates the resulting templates with t. The pattern is
110 // pattern.
114 func (t *Template) ParseGlob(pattern string) (*Template, error) {
116 return parseGlob(t, pattern)
120 func parseGlob(t *Template, pattern string) (*Template, error) {
121 filenames, err := filepath.Glob(pattern)
126 return nil, fmt.Errorf("template: pattern matches no files: %#q", pattern)