Skip to content

Commit

Permalink
Import order as goimports does
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
  • Loading branch information
vdemeester committed Dec 30, 2016
1 parent e4952cd commit b7a0b63
Show file tree
Hide file tree
Showing 37 changed files with 91 additions and 71 deletions.
5 changes: 3 additions & 2 deletions acme/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"crypto/tls"
"crypto/x509"
"errors"
"github.com/containous/traefik/log"
"github.com/xenolf/lego/acme"
"reflect"
"sync"
"time"

"github.com/containous/traefik/log"
"github.com/xenolf/lego/acme"
)

// Account is used to store lets encrypt registration info
Expand Down
11 changes: 6 additions & 5 deletions acme/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import (
"crypto/tls"
"errors"
"fmt"
"io/ioutil"
fmtlog "log"
"os"
"strings"
"time"

"github.com/BurntSushi/ty/fun"
"github.com/cenk/backoff"
"github.com/containous/staert"
Expand All @@ -14,11 +20,6 @@ import (
"github.com/containous/traefik/types"
"github.com/xenolf/lego/acme"
"github.com/xenolf/lego/providers/dns"
"io/ioutil"
fmtlog "log"
"os"
"strings"
"time"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion acme/acme_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package acme

import (
"encoding/base64"
"github.com/xenolf/lego/acme"
"net/http"
"net/http/httptest"
"reflect"
"sync"
"testing"

"github.com/xenolf/lego/acme"
)

func TestDomainsSet(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions acme/challengeProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package acme

import (
"crypto/tls"
"fmt"
"strings"
"sync"
"time"

"fmt"
"github.com/cenk/backoff"
"github.com/containous/traefik/cluster"
"github.com/containous/traefik/log"
"github.com/xenolf/lego/acme"
"time"
)

var _ acme.ChallengeProviderTimeout = (*challengeProvider)(nil)
Expand Down
5 changes: 3 additions & 2 deletions acme/localStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package acme
import (
"encoding/json"
"fmt"
"github.com/containous/traefik/cluster"
"github.com/containous/traefik/log"
"io/ioutil"
"sync"

"github.com/containous/traefik/cluster"
"github.com/containous/traefik/log"
)

var _ cluster.Store = (*LocalStore)(nil)
Expand Down
5 changes: 3 additions & 2 deletions cluster/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"context"
"encoding/json"
"fmt"
"sync"
"time"

"github.com/cenk/backoff"
"github.com/containous/staert"
"github.com/containous/traefik/job"
"github.com/containous/traefik/log"
"github.com/docker/libkv/store"
"github.com/satori/go.uuid"
"sync"
"time"
)

// Metadata stores Object plus metadata
Expand Down
3 changes: 2 additions & 1 deletion cluster/leadership.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package cluster

import (
"context"
"time"

"github.com/cenk/backoff"
"github.com/containous/traefik/log"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/docker/leadership"
"time"
)

// Leadership allows leadership election using a KV store
Expand Down
5 changes: 3 additions & 2 deletions cmd/bug.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/containous/flaeg"
"github.com/mvdan/xurls"
"net/url"
"os/exec"
"regexp"
"runtime"
"text/template"

"github.com/containous/flaeg"
"github.com/mvdan/xurls"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package cmd

import (
"fmt"
"github.com/containous/flaeg"
"github.com/containous/traefik/version"
"io"
"os"
"runtime"
"text/template"

"github.com/containous/flaeg"
"github.com/containous/traefik/version"
)

var versionTemplate = `Version: {{.Version}}
Expand Down
3 changes: 2 additions & 1 deletion job/job.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package job

import (
"github.com/cenk/backoff"
"time"

"github.com/cenk/backoff"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion job/job_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package job

import (
"github.com/cenk/backoff"
"testing"
"time"

"github.com/cenk/backoff"
)

func TestJobBackOff(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion log/logger.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package log

import (
"github.com/Sirupsen/logrus"
"io"

"github.com/Sirupsen/logrus"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions middlewares/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package middlewares

import (
"fmt"
"net/http"
"strings"

"github.com/abbot/go-http-auth"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/log"
"github.com/containous/traefik/types"
"net/http"
"strings"
)

// Authenticator is a middleware that provides HTTP basic and digest authentication
Expand Down
7 changes: 4 additions & 3 deletions middlewares/authenticator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package middlewares

import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/containous/traefik/types"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"

"github.com/codegangsta/negroni"
"github.com/containous/traefik/types"
"github.com/stretchr/testify/assert"
)

func TestBasicAuthFail(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion middlewares/compress.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package middlewares

import (
"github.com/NYTimes/gziphandler"
"net/http"

"github.com/NYTimes/gziphandler"
)

// Compress is a middleware that allows redirections
Expand Down
3 changes: 2 additions & 1 deletion middlewares/handlerSwitcher.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package middlewares

import (
"net/http"

"github.com/containous/mux"
"github.com/containous/traefik/safe"
"net/http"
)

// HandlerSwitcher allows hot switching of http.ServeMux
Expand Down
5 changes: 3 additions & 2 deletions middlewares/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package middlewares

import (
"fmt"
shellwords "github.com/mattn/go-shellwords"
"github.com/stretchr/testify/assert"
"io/ioutil"
"net/http"
"net/url"
"os"
"path/filepath"
"runtime"
"testing"

shellwords "github.com/mattn/go-shellwords"
"github.com/stretchr/testify/assert"
)

type logtestResponseWriter struct{}
Expand Down
5 changes: 3 additions & 2 deletions middlewares/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package middlewares
import (
"bufio"
"bytes"
"github.com/containous/traefik/log"
"github.com/vulcand/oxy/utils"
"net"
"net/http"

"github.com/containous/traefik/log"
"github.com/vulcand/oxy/utils"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion middlewares/rewrite.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package middlewares

import (
"net/http"

"github.com/containous/traefik/log"
"github.com/vulcand/vulcand/plugin/rewrite"
"net/http"
)

// Rewrite is a middleware that allows redirections
Expand Down
1 change: 1 addition & 0 deletions provider/boltdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package provider

import (
"fmt"

"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/docker/libkv/store"
Expand Down
1 change: 1 addition & 0 deletions provider/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package provider

import (
"fmt"

"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/docker/libkv/store"
Expand Down
3 changes: 1 addition & 2 deletions provider/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
docker "github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
"github.com/docker/engine-api/types/network"
"github.com/docker/engine-api/types/swarm"
"github.com/docker/go-connections/nat"

swarm "github.com/docker/engine-api/types/swarm"
)

func TestDockerGetFrontendName(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions provider/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package provider

import (
"fmt"

"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/docker/libkv/store"
Expand Down
11 changes: 6 additions & 5 deletions provider/eureka.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package provider

import (
"io/ioutil"
"strconv"
"strings"
"text/template"
"time"

"github.com/ArthurHlt/go-eureka-client/eureka"
log "github.com/Sirupsen/logrus"
"github.com/cenk/backoff"
"github.com/containous/traefik/job"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"io/ioutil"
"strconv"
"strings"
"text/template"
"time"
)

// Eureka holds configuration of the Eureka provider.
Expand Down
3 changes: 2 additions & 1 deletion provider/eureka_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package provider

import (
"github.com/ArthurHlt/go-eureka-client/eureka"
"testing"

"github.com/ArthurHlt/go-eureka-client/eureka"
)

func TestEurekaGetPort(t *testing.T) {
Expand Down
10 changes: 4 additions & 6 deletions provider/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ import (
"text/template"
"time"

"k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/pkg/util/intstr"

"github.com/cenk/backoff"
"github.com/containous/traefik/job"
"github.com/containous/traefik/log"
"github.com/containous/traefik/provider/k8s"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"

"github.com/cenk/backoff"
"github.com/containous/traefik/job"
"k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/pkg/util/intstr"
)

var _ Provider = (*Kubernetes)(nil)
Expand Down
5 changes: 2 additions & 3 deletions provider/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import (
"reflect"
"testing"

"github.com/containous/traefik/provider/k8s"
"github.com/containous/traefik/types"
"k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/pkg/apis/extensions/v1beta1"
"k8s.io/client-go/1.5/pkg/util/intstr"

"github.com/containous/traefik/provider/k8s"
"github.com/containous/traefik/types"
)

func TestLoadIngresses(t *testing.T) {
Expand Down

0 comments on commit b7a0b63

Please sign in to comment.