auth/internal/health/delivery/http/health_http.go

25 lines
454 B
Go
Raw Normal View History

package http
import (
2023-01-02 00:11:47 +00:00
"fmt"
"net/http"
2021-11-14 21:15:28 +00:00
"source.toby3d.me/toby3d/auth/internal/common"
)
2023-01-02 00:11:47 +00:00
type Handler struct{}
2023-01-02 00:11:47 +00:00
func NewHandler() *Handler {
return &Handler{}
}
func (h *Handler) Handler() http.Handler {
return http.HandlerFunc(h.handleFunc)
}
2023-01-02 00:11:47 +00:00
func (h *Handler) handleFunc(w http.ResponseWriter, r *http.Request) {
w.Header().Set(common.HeaderContentType, common.MIMETextPlainCharsetUTF8)
fmt.Fprint(w, `👌`)
w.WriteHeader(http.StatusOK)
}