auth/internal/health/delivery/http/health_http.go
Maxim Lebedev c7bd73c63a
♻️ Drop HTTP delivery framework
replaced 'valyala/fasthttp' to native 'net/http' package, close #4
2023-01-16 06:43:07 +06:00

25 lines
454 B
Go

package http
import (
"fmt"
"net/http"
"source.toby3d.me/toby3d/auth/internal/common"
)
type Handler struct{}
func NewHandler() *Handler {
return &Handler{}
}
func (h *Handler) Handler() http.Handler {
return http.HandlerFunc(h.handleFunc)
}
func (h *Handler) handleFunc(w http.ResponseWriter, r *http.Request) {
w.Header().Set(common.HeaderContentType, common.MIMETextPlainCharsetUTF8)
fmt.Fprint(w, `👌`)
w.WriteHeader(http.StatusOK)
}