Add goimports to linters.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-08-21 17:06:56 -04:00
parent 361a473121
commit 372670b507
11 changed files with 20 additions and 16 deletions

View file

@ -2,18 +2,17 @@ package client
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
"encoding/json"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/registry"
"golang.org/x/net/context"
)
func TestImageSearchAnyError(t *testing.T) {

View file

@ -2,8 +2,6 @@ package main
import (
"github.com/docker/docker/daemon/config"
runconfigopts "github.com/docker/docker/runconfig/opts"
units "github.com/docker/go-units"
"github.com/spf13/pflag"
)

View file

@ -1,9 +1,5 @@
package config
import (
"github.com/spf13/pflag"
)
// Config defines the configuration of a docker daemon.
// These are the configuration settings that you pass
// to the docker daemon when you launch it with say: `docker -d -e lxc`

View file

@ -1,6 +1,10 @@
package graphdriver
import "golang.org/x/sys/unix"
import (
"syscall"
"golang.org/x/sys/unix"
)
var (
// Slice of drivers that should be used in an order

View file

@ -64,6 +64,7 @@ install_gometalinter() {
export GOBIN=/usr/local/bin
export GOPATH="$PWD/_linters/"
go install github.com/golang/lint/golint
go install golang.org/x/tools/cmd/goimports
)
}

View file

@ -11,6 +11,7 @@
"Enable": [
"gofmt",
"goimports",
"golint",
"vet"
],

View file

@ -1,6 +1,9 @@
package libcontainerd
import "golang.org/x/net/context"
import (
containerd "github.com/containerd/containerd/api/grpc/types"
"golang.org/x/net/context"
)
type client struct {
clientCommon

View file

@ -1,6 +1,7 @@
package fileutils
import (
"fmt"
"io/ioutil"
"os"
"path"
@ -9,7 +10,6 @@ import (
"strings"
"testing"
"fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View file

@ -3,8 +3,9 @@
package mount
import (
"golang.org/x/sys/unix"
"unsafe"
"golang.org/x/sys/unix"
)
// #include <stdlib.h>

View file

@ -1,9 +1,9 @@
package streamformatter
import (
"bytes"
"testing"
"bytes"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View file

@ -2,8 +2,6 @@ package resumable
import (
"fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io"
"io/ioutil"
"net/http"
@ -11,6 +9,9 @@ import (
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestResumableRequestHeaderSimpleErrors(t *testing.T) {