Skip to content

Commit

Permalink
fix(gin): Fixed some configurations not taking effect when executing …
Browse files Browse the repository at this point in the history
…the `Option` method. (#64)

Signed-off-by: Flc゛ <[email protected]>
  • Loading branch information
flc1125 authored Jan 7, 2024
1 parent 61bb19e commit 80fd696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ func NewServer(e *gin.Engine, opts ...Option) *Server {
addr: ":8080",
}

for _, opt := range opts {
opt(srv)
}

srv.server = &http.Server{
Addr: srv.addr,
Handler: e,
}

for _, opt := range opts {
opt(srv)
}

return srv
}

Expand Down

0 comments on commit 80fd696

Please sign in to comment.