Fix some typos, fmt and imports :)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
cae02b02ac
commit
c038dfbd54
11 changed files with 96 additions and 88 deletions
|
@ -4,8 +4,9 @@ Copyright
|
|||
package middlewares
|
||||
|
||||
import (
|
||||
"github.com/mailgun/oxy/cbreaker"
|
||||
"net/http"
|
||||
|
||||
"github.com/mailgun/oxy/cbreaker"
|
||||
)
|
||||
|
||||
type CircuitBreaker struct {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -5,9 +5,10 @@ package middlewares
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gorilla/mux"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
type Routes struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue