diff options
| author | Leonardo Bishop <me@leonardobishop.net> | 2025-09-10 00:46:42 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.net> | 2025-09-10 00:46:42 +0100 |
| commit | d122d841e8b7dd7f8942b6f2fa84220f95f2cae4 (patch) | |
| tree | a00734c1109b222f2485bd31c61fdf5e00a6d516 /api/handlers/pong.go | |
| parent | baea81484f61fc341634ecf5e144d7ecf18ad42f (diff) | |
Add optional CSS to html
Diffstat (limited to 'api/handlers/pong.go')
| -rw-r--r-- | api/handlers/pong.go | 31 |
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)) + } +} |
