Skip to content

Commit

Permalink
chore(health): remove unneeded logger argument in newHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Dec 7, 2022
1 parent e197478 commit 3ad972b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions internal/health/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ package health

import (
"net/http"

"github.com/qdm12/golibs/logging"
)

func newHandler(logger logging.Logger, healthcheck func() error) http.Handler {
func newHandler(healthcheck func() error) http.Handler {
return &handler{
logger: logger,
healthcheck: healthcheck,
}
}

type handler struct {
logger logging.Logger
healthcheck func() error
}

Expand Down
2 changes: 1 addition & 1 deletion internal/health/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Server struct {
}

func NewServer(address string, logger logging.Logger, healthcheck func() error) *Server {
handler := newHandler(logger, healthcheck)
handler := newHandler(healthcheck)
return &Server{
address: address,
logger: logger,
Expand Down

0 comments on commit 3ad972b

Please sign in to comment.