ParseFile creates a new shell format template and parses the template definition from the named file.
(path string)
| 38 | // ParseFile creates a new shell format template and parses the template |
| 39 | // definition from the named file. |
| 40 | func ParseFile(path string) (*Template, error) { |
| 41 | b, err := ioutil.ReadFile(path) |
| 42 | if err != nil { |
| 43 | return nil, err |
| 44 | } |
| 45 | return Parse(string(b)) |
| 46 | } |
| 47 | |
| 48 | // Execute applies a parsed template to the specified data mapping. |
| 49 | func (t *Template) Execute(mapping func(string) string) (str string, err error) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…