try same OS for build/run images, per feedback #2
@ -1,7 +1,6 @@
|
||||
package httpserver
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -11,6 +10,5 @@ import (
|
||||
func (s *server) handlePanic() http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
panic("y tho")
|
||||
fmt.Fprintf(w, "hello world")
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ func (s *server) routes() {
|
||||
// .ServeHTTP of the http.Handler to get its HandleFunc, viz:
|
||||
s.router.HandleFunc(
|
||||
"/login",
|
||||
authMiddleware(s.handleLogin()).ServeHTTP
|
||||
authMiddleware(s.handleLogin()).ServeHTTP,
|
||||
).Methods("GET")
|
||||
|
||||
s.router.HandleFunc(
|
||||
@ -29,7 +29,7 @@ func (s *server) routes() {
|
||||
// CHANGEME remove this
|
||||
s.router.HandleFunc(
|
||||
"/panic",
|
||||
s.handlePanic()
|
||||
s.handlePanic(),
|
||||
).Methods("GET")
|
||||
|
||||
// the Gorilla mux .Use() takes a http.Handler wrapper func, like
|
||||
|
Loading…
Reference in New Issue
Block a user