doc error on [register a handler with the server]
Closed this issue · 2 comments
byene0923 commented
Describe the bug
doc error
Additional context
Register a handler, does the code on step 3 need to update?
func NewHTTPServer(lc fx.Lifecycle, mux *http.ServeMux) *http.Server {
srv := &http.Server{Addr: ":8080", Handler: mux}
lc.Append(fx.Hook{
JacobOaks commented
What is the doc error you're referring to?
The whole function was shown in a previous step and I assume it was cut off here because we only need to show the changed lines (the addition of mux
).
byene0923 commented
i got it, thanks a lot