• Miek Gieben's avatar
    Add middleware.NextOrFailure (#462) · c4ab98c6
    Miek Gieben authored
    This checks if the next middleware to be called is nil, and if so returns
    ServerFailure and an error. This makes the next calling more robust and
    saves some lines of code.
    
    Also prefix the error with the name of the middleware to aid in
    debugging.
    c4ab98c6
handler.go 2.63 KB