diff options
-rw-r--r-- | pkg/app/home/utils.go | 4 | ||||
-rw-r--r-- | pkg/app/popular/utils.go | 6 | ||||
-rw-r--r-- | pkg/models/thread.go | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pkg/app/home/utils.go b/pkg/app/home/utils.go index daab2de..f854549 100644 --- a/pkg/app/home/utils.go +++ b/pkg/app/home/utils.go @@ -17,9 +17,9 @@ func renderIndexTemplate(w http.ResponseWriter, templateData interface{}) { template.Must( template.New("Show"). Funcs(template.FuncMap{ - "makeMessage" : func(headers map[string][]string) models.Message { + "makeMessage": func(headers map[string][]string) models.Message { return models.Message{ - Headers: headers, + Headers: headers, } }, }). diff --git a/pkg/app/popular/utils.go b/pkg/app/popular/utils.go index 6cfeff7..c5772d7 100644 --- a/pkg/app/popular/utils.go +++ b/pkg/app/popular/utils.go @@ -14,12 +14,12 @@ func renderPopularThreads(w http.ResponseWriter, templateData interface{}) { template.Must( template.New("Popular"). Funcs(template.FuncMap{ - "makeMessage" : func(headers map[string][]string) models.Message { + "makeMessage": func(headers map[string][]string) models.Message { return models.Message{ - Headers: headers, + Headers: headers, } }, - }). + }). ParseGlob("web/templates/layout/*.tmpl")). ParseGlob("web/templates/popular/*.tmpl")) diff --git a/pkg/models/thread.go b/pkg/models/thread.go index ebeff2a..3f50bde 100644 --- a/pkg/models/thread.go +++ b/pkg/models/thread.go @@ -1,8 +1,8 @@ package models type Threads []struct { - Id string - Headers map[string][]string - Subject string - Count int + Id string + Headers map[string][]string + Subject string + Count int } |