Skip to content

Commit

Permalink
Fix Server interface to accept http.Handler rather than explicit Serv…
Browse files Browse the repository at this point in the history
…eMux
  • Loading branch information
thisisaaronland committed Jul 4, 2021
1 parent 67562b0 commit 4c7fe2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (s *HTTPServer) Address() string {
return u.String()
}

func (s *HTTPServer) ListenAndServe(ctx context.Context, mux *http.ServeMux) error {
func (s *HTTPServer) ListenAndServe(ctx context.Context, mux http.Handler) error {

idleConnsClosed := make(chan struct{})

Expand Down
2 changes: 1 addition & 1 deletion lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (s *LambdaServer) Address() string {
return s.url.String()
}

func (s *LambdaServer) ListenAndServe(ctx context.Context, mux *http.ServeMux) error {
func (s *LambdaServer) ListenAndServe(ctx context.Context, mux http.Handler) error {

lambda_opts := new(algnhsa.Options)

Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type Server interface {
ListenAndServe(context.Context, *http.ServeMux) error
ListenAndServe(context.Context, http.Handler) error
Address() string
}

Expand Down

0 comments on commit 4c7fe2c

Please sign in to comment.