summaryrefslogtreecommitdiffstats
path: root/api/handlers/pong.go
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2025-09-10 00:46:42 +0100
committerLeonardo Bishop <me@leonardobishop.net>2025-09-10 00:46:42 +0100
commitd122d841e8b7dd7f8942b6f2fa84220f95f2cae4 (patch)
treea00734c1109b222f2485bd31c61fdf5e00a6d516 /api/handlers/pong.go
parentbaea81484f61fc341634ecf5e144d7ecf18ad42f (diff)
Add optional CSS to html
Diffstat (limited to 'api/handlers/pong.go')
-rw-r--r--api/handlers/pong.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/api/handlers/pong.go b/api/handlers/pong.go
new file mode 100644
index 0000000..ee0d445
--- /dev/null
+++ b/api/handlers/pong.go
@@ -0,0 +1,31 @@
+package handlers
+
+import (
+ "net/http"
+)
+
+const pong = `<!DOCTYPE html>
+<html>
+<head>
+<title>Pong!</title>
+</head>
+<body>
+<pre>
+ _______
+< Pong! >
+ -------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
+</pre>
+</body>
+</html>`
+
+func Pong() http.HandlerFunc {
+ return func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "text/html")
+ w.Write([]byte(pong))
+ }
+}