diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-06-19 18:55:56 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-06-19 18:55:56 -0400 |
commit | 1f2a822fe845e858a97009a572a71390e9ba1413 (patch) | |
tree | f6b77ebddb2b894f5121e1d6c66c25b945e41eef | |
parent | b01ccb904e702e76fc4b5f0c90fd5af056b64a51 (diff) |
peach: update `showMeta`
-rw-r--r-- | main.go | 11 | ||||
-rw-r--r-- | meta/meta.go | 18 |
2 files changed, 8 insertions, 21 deletions
@@ -13,7 +13,6 @@ import ( "regexp" "strconv" - "ricketyspace.net/peach/meta" "ricketyspace.net/peach/search" "ricketyspace.net/peach/version" "ricketyspace.net/peach/weather" @@ -106,10 +105,16 @@ func showWeather(w http.ResponseWriter, lat, lng float32) { func showMeta(w http.ResponseWriter, r *http.Request) { // Make meta info. - meta := meta.NewMeta() + type Meta struct { + Version string + Title string + } + m := new(Meta) + m.Version = version.Version + m.Title = "about" // Render. - err := peachTemplates.ExecuteTemplate(w, "about.tmpl", meta) + err := peachTemplates.ExecuteTemplate(w, "about.tmpl", m) if err != nil { log.Printf("weather: template: %v", err) return diff --git a/meta/meta.go b/meta/meta.go deleted file mode 100644 index 0aa8979..0000000 --- a/meta/meta.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2022 siddharth ravikumar <s@ricketyspace.net> -// SPDX-License-Identifier: ISC - -package meta - -import "ricketyspace.net/peach/version" - -type Meta struct { - Version string - Title string -} - -func NewMeta() *Meta { - m := new(Meta) - m.Version = version.Version - m.Title = "about" - return m -} |