Skip to content

Commit c851d5d

Browse files
committed
return pointer for reduced copying
1 parent 9bbc725 commit c851d5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ type Template struct {
3535
}
3636

3737
// New creates translatable HTML pages
38-
func New(baseContents string, funcs template.FuncMap) Template {
39-
t := Template{
38+
func New(baseContents string, funcs template.FuncMap) *Template {
39+
t := &Template{
4040
pages: make(map[string]page),
4141
pagesCached: make(pageCache),
4242
baseTemplateFuncs: funcs, // functions available to all pages

0 commit comments

Comments
 (0)