1
0
Fork 0

Fix some typos, fmt and imports :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-09-24 17:16:13 +02:00
parent cae02b02ac
commit c038dfbd54
11 changed files with 96 additions and 88 deletions

View file

@ -4,8 +4,9 @@ Copyright
package middlewares
import (
"github.com/mailgun/oxy/cbreaker"
"net/http"
"github.com/mailgun/oxy/cbreaker"
)
type CircuitBreaker struct {

View file

@ -4,10 +4,11 @@ Copyright
package middlewares
import (
"github.com/gorilla/handlers"
"log"
"net/http"
"os"
"github.com/gorilla/handlers"
)
// Logger is a middleware handler that logs the request as it goes in and the response as it goes out.
@ -23,9 +24,8 @@ func NewLogger(file string) *Logger {
log.Fatal("Error opening file", err)
}
return &Logger{fi}
} else {
return &Logger{nil}
}
return &Logger{nil}
}
func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {

View file

@ -5,9 +5,10 @@ package middlewares
import (
"encoding/json"
"github.com/gorilla/mux"
"log"
"net/http"
"github.com/gorilla/mux"
)
type Routes struct {