fixes broken build. i'll go protect master now oops
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									de9fae295d
								
							
						
					
					
						commit
						9b839e9b97
					
				| @ -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") | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -16,20 +16,20 @@ func (s *server) routes() { | ||||
| 	// wrapper) on a specific HandleFunc route, you need to take the
 | ||||
| 	// .ServeHTTP of the http.Handler to get its HandleFunc, viz:
 | ||||
| 	s.router.HandleFunc( | ||||
| 	    "/login", | ||||
| 	    authMiddleware(s.handleLogin()).ServeHTTP | ||||
| 		"/login", | ||||
| 		authMiddleware(s.handleLogin()).ServeHTTP, | ||||
| 	).Methods("GET") | ||||
| 
 | ||||
| 	s.router.HandleFunc( | ||||
| 	    "/.well-known/healthcheck.json", | ||||
| 	    s.handleHealthCheck(), | ||||
| 		"/.well-known/healthcheck.json", | ||||
| 		s.handleHealthCheck(), | ||||
| 	).Methods("GET") | ||||
| 
 | ||||
| 	// route that panics for testing
 | ||||
| 	// CHANGEME remove this
 | ||||
| 	s.router.HandleFunc( | ||||
| 	    "/panic", | ||||
| 	    s.handlePanic() | ||||
| 		"/panic", | ||||
| 		s.handlePanic(), | ||||
| 	).Methods("GET") | ||||
| 
 | ||||
| 	// the Gorilla mux .Use() takes a http.Handler wrapper func, like
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user