refactor: migration Negroni from codegangsta to urfave

This commit is contained in:
Fernandez Ludovic 2017-07-19 12:02:51 +02:00 committed by Ludovic Fernandez
parent c36e0b3b06
commit 40d9058bb6
22 changed files with 16 additions and 20 deletions

View file

@ -87,7 +87,7 @@ You can access the simple HTML frontend of Træfik.
- [Oxy](https://github.com/vulcand/oxy): an awesome proxy library made by Mailgun folks
- [Gorilla mux](https://github.com/gorilla/mux): famous request router
- [Negroni](https://github.com/codegangsta/negroni): web middlewares made simple
- [Negroni](https://github.com/urfave/negroni): web middlewares made simple
- [Lego](https://github.com/xenolf/lego): the best [Let's Encrypt](https://letsencrypt.org) library in go
## Test it

6
glide.lock generated
View file

@ -1,4 +1,4 @@
hash: 61dae796d71e48c988433d0655e9c6ae64a1954a6a54b9b00a5db7e759dbca0e
hash: 6aff4c6177ddc3247530d141a93f5bb044ee72acaa63b5667ceb205828c8ad03
updated: 2017-07-11T23:50:31.241672481+02:00
imports:
- name: cloud.google.com/go
@ -82,10 +82,8 @@ imports:
version: 9208b142303c12d8899bae836fd524ac9338b4fd
- name: github.com/codegangsta/cli
version: bf4a526f48af7badd25d2cb02d587e1b01be3b50
- name: github.com/codegangsta/negroni
- name: github.com/urfave/negroni
version: 490e6a555d47ca891a89a150d0c1ef3922dfffe9
repo: https://github.com/urfave/negroni.git
vcs: git
- name: github.com/containous/flaeg
version: b5d2dc5878df07c2d74413348186982e7b865871
- name: github.com/containous/mux

View file

@ -22,10 +22,8 @@ import:
- roundrobin
- stream
- utils
- name: github.com/codegangsta/negroni
- name: github.com/urfave/negroni
version: 490e6a555d47ca891a89a150d0c1ef3922dfffe9
repo: https://github.com/urfave/negroni.git
vcs: git
- package: github.com/containous/staert
version: 1e26a71803e428fd933f5f9c8e50a26878f53147
- package: github.com/docker/docker

View file

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/codegangsta/negroni"
"github.com/urfave/negroni"
"github.com/vulcand/oxy/utils"
)

View file

@ -7,9 +7,9 @@ import (
"strings"
"github.com/abbot/go-http-auth"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/log"
"github.com/containous/traefik/types"
"github.com/urfave/negroni"
)
// Authenticator is a middleware that provides HTTP basic and digest authentication

View file

@ -8,10 +8,10 @@ import (
"os"
"testing"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/testhelpers"
"github.com/containous/traefik/types"
"github.com/stretchr/testify/assert"
"github.com/urfave/negroni"
)
func TestAuthUsersFromFile(t *testing.T) {

View file

@ -7,9 +7,9 @@ import (
"strconv"
"testing"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/types"
"github.com/stretchr/testify/assert"
"github.com/urfave/negroni"
)
func TestErrorPage(t *testing.T) {

View file

@ -5,9 +5,9 @@ import (
"net"
"net/http"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/log"
"github.com/pkg/errors"
"github.com/urfave/negroni"
)
// IPWhitelister is a middleware that provides Checks of the Requesting IP against a set of Whitelists

View file

@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/testhelpers"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/negroni"
)
func TestNewIPWhitelister(t *testing.T) {

View file

@ -8,13 +8,13 @@ import (
"strings"
"testing"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/testhelpers"
"github.com/containous/traefik/types"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
dto "github.com/prometheus/client_model/go"
"github.com/stretchr/testify/assert"
"github.com/urfave/negroni"
)
func TestPrometheus(t *testing.T) {

View file

@ -3,8 +3,8 @@ package middlewares
import (
"net/http"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/log"
"github.com/urfave/negroni"
)
// RecoverHandler recovers from a panic in http handlers

View file

@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"
"github.com/codegangsta/negroni"
"github.com/urfave/negroni"
)
func TestRecoverHandler(t *testing.T) {

View file

@ -18,7 +18,6 @@ import (
"syscall"
"time"
"github.com/codegangsta/negroni"
"github.com/containous/mux"
"github.com/containous/traefik/cluster"
"github.com/containous/traefik/healthcheck"
@ -29,6 +28,7 @@ import (
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/streamrail/concurrent-map"
"github.com/urfave/negroni"
"github.com/vulcand/oxy/cbreaker"
"github.com/vulcand/oxy/connlimit"
"github.com/vulcand/oxy/forward"

View file

@ -9,7 +9,6 @@ import (
"testing"
"time"
"github.com/codegangsta/negroni"
"github.com/containous/flaeg"
"github.com/containous/mux"
"github.com/containous/traefik/healthcheck"
@ -19,6 +18,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/urfave/negroni"
"github.com/vulcand/oxy/roundrobin"
)

View file

@ -8,7 +8,6 @@ import (
"net/http"
"runtime"
"github.com/codegangsta/negroni"
"github.com/containous/mux"
"github.com/containous/traefik/autogen"
"github.com/containous/traefik/log"
@ -20,6 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
thoas_stats "github.com/thoas/stats"
"github.com/unrolled/render"
"github.com/urfave/negroni"
)
var (