Header returns a Go source file header section template.
(title, pack string, imports []*ImportSpec)
| 9 | |
| 10 | // Header returns a Go source file header section template. |
| 11 | func Header(title, pack string, imports []*ImportSpec) *SectionTemplate { |
| 12 | return &SectionTemplate{ |
| 13 | Name: "source-header", |
| 14 | Source: codegenTemplates.Read(headerT), |
| 15 | Data: map[string]any{ |
| 16 | "Title": title, |
| 17 | "Pkg": pack, |
| 18 | "Imports": imports, |
| 19 | }, |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // VersionFile returns a file that contains the goa version used to generate |
| 24 | // the code. The file is written to gen/goa.json. |