mirror of
https://github.com/skidoodle/ipinfo.git
synced 2026-04-28 01:27:34 +02:00
16 lines
293 B
Go
16 lines
293 B
Go
package utils
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Returns a simple health check handler
|
|
func HealthCheck() http.Handler {
|
|
mux := http.NewServeMux()
|
|
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusOK)
|
|
w.Write([]byte("Healthy"))
|
|
})
|
|
return mux
|
|
}
|