diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-06-05 23:29:28 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-06-05 23:30:00 -0400 |
commit | d6be455450c78b27c704fb8fd165abd7ecfc4966 (patch) | |
tree | c742e0230b76af123adfb3435c22416ef4403349 /main.go | |
parent | 8c2a7b425f3879f2fbeaca3f0a3b796f84c90d67 (diff) |
peach: add `/version` endpoint
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -93,6 +93,10 @@ func main() { http.Redirect(w, r, "/41.115,-83.177", 302) return } + if r.URL.Path == "/version" { + fmt.Fprintf(w, "v%s\n", version.Version) + return + } m := latLngRegex.FindStringSubmatch(r.URL.Path) if len(m) != 3 || m[0] != r.URL.Path { |