try same OS for build/run images, per feedback #2

Manually merged
sneak merged 5 commits from sneak/fixdocker into master 2020-10-03 02:20:30 +00:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit db049e3b67 - Show all commits

View File

@ -1,7 +1,6 @@
package httpserver package httpserver
import ( import (
"fmt"
"net/http" "net/http"
) )
@ -11,6 +10,5 @@ import (
func (s *server) handlePanic() http.HandlerFunc { func (s *server) handlePanic() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) { return func(w http.ResponseWriter, r *http.Request) {
panic("y tho") panic("y tho")
fmt.Fprintf(w, "hello world")
} }
} }

View File

@ -16,20 +16,20 @@ func (s *server) routes() {
// wrapper) on a specific HandleFunc route, you need to take the // wrapper) on a specific HandleFunc route, you need to take the
// .ServeHTTP of the http.Handler to get its HandleFunc, viz: // .ServeHTTP of the http.Handler to get its HandleFunc, viz:
s.router.HandleFunc( s.router.HandleFunc(
"/login", "/login",
authMiddleware(s.handleLogin()).ServeHTTP authMiddleware(s.handleLogin()).ServeHTTP,
).Methods("GET") ).Methods("GET")
s.router.HandleFunc( s.router.HandleFunc(
"/.well-known/healthcheck.json", "/.well-known/healthcheck.json",
s.handleHealthCheck(), s.handleHealthCheck(),
).Methods("GET") ).Methods("GET")
// route that panics for testing // route that panics for testing
// CHANGEME remove this // CHANGEME remove this
s.router.HandleFunc( s.router.HandleFunc(
"/panic", "/panic",
s.handlePanic() s.handlePanic(),
).Methods("GET") ).Methods("GET")
// the Gorilla mux .Use() takes a http.Handler wrapper func, like // the Gorilla mux .Use() takes a http.Handler wrapper func, like