Section returns the section templates with the given name or nil if not found.
(name string)
| 55 | |
| 56 | // Section returns the section templates with the given name or nil if not found. |
| 57 | func (f *File) Section(name string) []*SectionTemplate { |
| 58 | var sts []*SectionTemplate |
| 59 | for _, s := range f.SectionTemplates { |
| 60 | if s.Name == name { |
| 61 | sts = append(sts, s) |
| 62 | } |
| 63 | } |
| 64 | return sts |
| 65 | } |
| 66 | |
| 67 | // Render executes the file section templates and writes the resulting bytes to |
| 68 | // an output file. The path of the output file is computed by appending the file |
no outgoing calls