add domain whois/dns support, refactor codebase

This commit is contained in:
2025-09-17 20:38:51 +02:00
parent 477bc242aa
commit 16fc344a68
29 changed files with 1396 additions and 867 deletions
+22
View File
@@ -0,0 +1,22 @@
package utils
import (
"log/slog"
"net/http"
)
// HealthCheck Returns a simple health check handler.
func HealthCheck() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
_, err := w.Write([]byte("OK"))
if err != nil {
slog.Warn("failed to write healthcheck response",
"component", "healthcheck",
"method", r.Method,
"path", r.URL.Path,
"error", err,
)
}
})
}