LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package template | 5 package template |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "io" | 9 "io" |
10 "io/ioutil" | 10 "io/ioutil" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 func parseGlob(t *Template, pattern string) (*Template, error) { | 380 func parseGlob(t *Template, pattern string) (*Template, error) { |
381 filenames, err := filepath.Glob(pattern) | 381 filenames, err := filepath.Glob(pattern) |
382 if err != nil { | 382 if err != nil { |
383 return nil, err | 383 return nil, err |
384 } | 384 } |
385 if len(filenames) == 0 { | 385 if len(filenames) == 0 { |
386 return nil, fmt.Errorf("html/template: pattern matches no files:
%#q", pattern) | 386 return nil, fmt.Errorf("html/template: pattern matches no files:
%#q", pattern) |
387 } | 387 } |
388 return parseFiles(t, filenames...) | 388 return parseFiles(t, filenames...) |
389 } | 389 } |
LEFT | RIGHT |