summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-06-05 23:29:28 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-06-05 23:30:00 -0400
commitd6be455450c78b27c704fb8fd165abd7ecfc4966 (patch)
treec742e0230b76af123adfb3435c22416ef4403349
parent8c2a7b425f3879f2fbeaca3f0a3b796f84c90d67 (diff)
peach: add `/version` endpoint
-rw-r--r--main.go4
-rw-r--r--version/version.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 267f473..6c8c442 100644
--- a/main.go
+++ b/main.go
@@ -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 {
diff --git a/version/version.go b/version/version.go
index a29eb36..86672ae 100644
--- a/version/version.go
+++ b/version/version.go
@@ -4,4 +4,4 @@
// Peach version.
package version
-const Version = "0.2.1"
+const Version = "0.3.0.dev1"