summaryrefslogtreecommitdiff
path: root/internal/template.go
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel_thestrup@mithe.dk>2025-12-07 02:32:30 +0100
committerMikkel Thestrup <mikkel_thestrup@mithe.dk>2025-12-07 02:32:30 +0100
commit67c0494af3863887f3e2b6f6930fdace571606ad (patch)
treec87121ac5e75756313fc33ccd8f59c307cf5eb5e /internal/template.go
parentd243b30606673baec988c5cd0a31e450f2794ca4 (diff)
downloadweb-portfolio-67c0494af3863887f3e2b6f6930fdace571606ad.tar.gz
web-portfolio-67c0494af3863887f3e2b6f6930fdace571606ad.zip
Fixed formating. Always max 80 chars a lineHEADmaster
Diffstat (limited to 'internal/template.go')
-rw-r--r--internal/template.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/template.go b/internal/template.go
index 118f7a2..3800aef 100644
--- a/internal/template.go
+++ b/internal/template.go
@@ -29,11 +29,19 @@ func NewTemplateEngine() (*TemplateEngine, error) {
return &TemplateEngine{tmpl: tmpl}, nil
}
-func (te *TemplateEngine) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
+func (te *TemplateEngine) Render(
+ w io.Writer,
+ name string,
+ data interface{},
+ c echo.Context,
+) error {
return te.tmpl.ExecuteTemplate(w, name, data)
}
-func (te *TemplateEngine) GetContent(page, section string) (template.HTML, error) {
+func (te *TemplateEngine) GetContent(
+ page,
+ section string,
+) (template.HTML, error) {
templateName := fmt.Sprintf("%s_%s", page, section)
var buf bytes.Buffer