Merge pull request #1038 from kolyshkin/context

Switch from x/net/context to context
This commit is contained in:
Brian Goff 2018-05-11 22:13:52 -04:00 committed by GitHub
commit fd060d2f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
171 changed files with 197 additions and 188 deletions

View File

@ -1,9 +1,10 @@
package checkpoint
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,10 +1,9 @@
package checkpoint
import (
"context"
"fmt"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

View File

@ -1,7 +1,7 @@
package checkpoint
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,7 +1,7 @@
package checkpoint
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,6 +1,7 @@
package command
import (
"context"
"io"
"net"
"net/http"
@ -28,7 +29,6 @@ import (
"github.com/theupdateframework/notary"
notaryclient "github.com/theupdateframework/notary/client"
"github.com/theupdateframework/notary/passphrase"
"golang.org/x/net/context"
)
// Streams is an interface which exposes the standard input and output streams

View File

@ -1,6 +1,7 @@
package command
import (
"context"
"crypto/x509"
"os"
"runtime"
@ -17,7 +18,6 @@ import (
"github.com/gotestyourself/gotestyourself/env"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestNewAPIClientFromFlags(t *testing.T) {

View File

@ -1,10 +1,11 @@
package config
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"io"
"io/ioutil"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/pkg/system"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type createOptions struct {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"sort"
"github.com/docker/cli/cli"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/spf13/cobra"
"golang.org/x/net/context"
"vbom.ml/util/sortorder"
)

View File

@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type removeOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -14,7 +15,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type attachOptions struct {

View File

@ -1,13 +1,13 @@
package container
import (
"context"
"io"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type commitOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io"
"os"
"path/filepath"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/pkg/system"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type copyOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"os"
@ -17,7 +18,6 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
type createOptions struct {

View File

@ -1,12 +1,13 @@
package container
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type diffOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
@ -13,7 +14,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type execOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io/ioutil"
"testing"
@ -12,7 +13,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func withDefaultOpts(options execOptions) execOptions {

View File

@ -1,13 +1,13 @@
package container
import (
"context"
"io"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type exportOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"runtime"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// The default escape key sequence: ctrl-p, ctrl-q

View File

@ -1,11 +1,12 @@
package container
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/inspect"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type killOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io/ioutil"
"github.com/docker/cli/cli"
@ -10,7 +11,6 @@ import (
"github.com/docker/cli/templates"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type psOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"io"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type logsOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pauseOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -9,7 +10,6 @@ import (
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type portOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/opts"
units "github.com/docker/go-units"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pruneOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type renameOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"time"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type restartOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -9,7 +10,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type rmOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -21,7 +22,6 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
type runOptions struct {
@ -157,6 +157,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
}
ctx, cancelFun := context.WithCancel(context.Background())
defer cancelFun()
createResponse, err := createContainer(ctx, dockerCli, containerConfig, &opts.createOptions)
if err != nil {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"net/http/httputil"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type startOptions struct {
@ -55,6 +55,7 @@ func NewStartCommand(dockerCli command.Cli) *cobra.Command {
// nolint: gocyclo
func runStart(dockerCli command.Cli, opts *startOptions) error {
ctx, cancelFun := context.WithCancel(context.Background())
defer cancelFun()
if opts.attach || opts.openStdin {
// We're going to attach to a container.

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"io"
"strings"
@ -15,7 +16,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type statsOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"encoding/json"
"io"
"strings"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type stats struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"time"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type stopOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
"text/tabwriter"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type topOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"os"
gosignal "os/signal"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// resizeTtyTo resizes tty to specific height and width

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type unpauseOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -10,7 +11,6 @@ import (
containertypes "github.com/docker/docker/api/types/container"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type updateOptions struct {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"strconv"
"github.com/docker/cli/cli/command"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func waitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID string, waitRemove bool) <-chan int {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"strings"
"testing"
@ -10,7 +11,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func waitFn(cid string) (<-chan container.ContainerWaitOKBody, <-chan error) {

View File

@ -1,6 +1,7 @@
package container
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type waitOptions struct {

View File

@ -1,10 +1,11 @@
package idresolver
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,7 +1,7 @@
package idresolver
import (
"golang.org/x/net/context"
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"

View File

@ -7,9 +7,10 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
// Import builders to get the builder function as package function
"context"
. "github.com/docker/cli/internal/test/builders"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestResolveError(t *testing.T) {

View File

@ -4,6 +4,7 @@ import (
"archive/tar"
"bufio"
"bytes"
"context"
"encoding/json"
"fmt"
"io"
@ -32,7 +33,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type buildOptions struct {

View File

@ -4,6 +4,7 @@ import (
"archive/tar"
"bytes"
"compress/gzip"
"context"
"io"
"io/ioutil"
"os"
@ -19,7 +20,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
"github.com/gotestyourself/gotestyourself/fs"
"github.com/gotestyourself/gotestyourself/skip"
"golang.org/x/net/context"
)
func TestRunBuildDockerfileFromStdinWithCompress(t *testing.T) {

View File

@ -1,6 +1,7 @@
package image
import (
"context"
"io"
"io/ioutil"
"strings"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,7 +1,7 @@
package image
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,6 +1,7 @@
package image
import (
"context"
"io"
"os"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/urlutil"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type importOptions struct {

View File

@ -1,7 +1,7 @@
package image
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,13 +1,14 @@
package image
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type imagesOptions struct {

View File

@ -1,10 +1,9 @@
package image
import (
"context"
"io"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/pkg/jsonmessage"

View File

@ -1,10 +1,9 @@
package image
import (
"context"
"fmt"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"

View File

@ -1,6 +1,7 @@
package image
import (
"context"
"fmt"
"strings"
@ -10,7 +11,6 @@ import (
"github.com/docker/distribution/reference"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
// PullOptions defines what and how to pull

View File

@ -1,7 +1,7 @@
package image
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,11 +1,10 @@
package image
import (
"context"
"fmt"
"strings"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

View File

@ -1,6 +1,7 @@
package image
import (
"context"
"io"
"os"
"path/filepath"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type saveOptions struct {

View File

@ -1,7 +1,7 @@
package image
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,6 +1,7 @@
package image
import (
"context"
"encoding/hex"
"encoding/json"
"fmt"
@ -19,7 +20,6 @@ import (
"github.com/sirupsen/logrus"
"github.com/theupdateframework/notary/client"
"github.com/theupdateframework/notary/tuf/data"
"golang.org/x/net/context"
)
type target struct {

View File

@ -1,12 +1,13 @@
package manifest
import (
"context"
manifesttypes "github.com/docker/cli/cli/manifest/types"
"github.com/docker/cli/cli/registry/client"
"github.com/docker/distribution"
"github.com/docker/distribution/reference"
"github.com/opencontainers/go-digest"
"golang.org/x/net/context"
)
type fakeRegistryClient struct {

View File

@ -1,6 +1,7 @@
package manifest
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -9,7 +10,6 @@ import (
"github.com/docker/docker/registry"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type createOpts struct {

View File

@ -1,6 +1,7 @@
package manifest
import (
"context"
"io/ioutil"
"testing"
@ -11,7 +12,6 @@ import (
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestManifestCreateErrors(t *testing.T) {

View File

@ -2,6 +2,7 @@ package manifest
import (
"bytes"
"context"
"encoding/json"
"fmt"
@ -12,7 +13,6 @@ import (
"github.com/docker/distribution/reference"
"github.com/docker/docker/registry"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package manifest
import (
"context"
"io/ioutil"
"os"
"testing"
@ -17,7 +18,6 @@ import (
"github.com/gotestyourself/gotestyourself/golden"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func newTempManifestStore(t *testing.T) (store.Store, func()) {

View File

@ -1,6 +1,7 @@
package manifest
import (
"context"
"encoding/json"
"fmt"
"io"
@ -15,7 +16,6 @@ import (
"github.com/docker/docker/registry"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pushOpts struct {

View File

@ -1,6 +1,7 @@
package manifest
import (
"context"
"io/ioutil"
"testing"
@ -9,7 +10,6 @@ import (
"github.com/docker/distribution/reference"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func newFakeRegistryClient() *fakeRegistryClient {

View File

@ -1,11 +1,12 @@
package manifest
import (
"context"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/manifest/store"
"github.com/docker/cli/cli/manifest/types"
"github.com/docker/distribution/reference"
"golang.org/x/net/context"
)
type osArch struct {

View File

@ -1,10 +1,11 @@
package network
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,12 +1,13 @@
package network
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types/network"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type connectOptions struct {

View File

@ -1,6 +1,7 @@
package network
import (
"context"
"io/ioutil"
"testing"
@ -9,7 +10,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestNetworkConnectErrors(t *testing.T) {

View File

@ -1,6 +1,7 @@
package network
import (
"context"
"fmt"
"net"
"strings"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/api/types/network"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type createOptions struct {

View File

@ -1,6 +1,7 @@
package network
import (
"context"
"io/ioutil"
"strings"
"testing"
@ -11,7 +12,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestNetworkCreateErrors(t *testing.T) {

View File

@ -1,7 +1,7 @@
package network
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,13 +1,13 @@
package network
import (
"context"
"io/ioutil"
"testing"
"github.com/docker/cli/internal/test"
"github.com/gotestyourself/gotestyourself/assert"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestNetworkDisconnectErrors(t *testing.T) {

View File

@ -1,7 +1,7 @@
package network
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,6 +1,7 @@
package network
import (
"context"
"sort"
"github.com/docker/cli/cli"
@ -9,7 +10,6 @@ import (
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type byNetworkName []types.NetworkResource

View File

@ -1,6 +1,7 @@
package network
import (
"context"
"io/ioutil"
"strings"
"testing"
@ -14,7 +15,6 @@ import (
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/gotestyourself/gotestyourself/golden"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestNetworkListErrors(t *testing.T) {

View File

@ -1,13 +1,13 @@
package network
import (
"context"
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type pruneOptions struct {

View File

@ -1,10 +1,9 @@
package network
import (
"context"
"fmt"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

View File

@ -1,10 +1,11 @@
package node
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,6 +1,7 @@
package node
import (
"context"
"errors"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/types"
apiclient "github.com/docker/docker/client"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
// NewNodeCommand returns a cobra command for `node` subcommands

View File

@ -1,6 +1,7 @@
package node
import (
"context"
"fmt"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package node
import (
"context"
"sort"
"github.com/docker/cli/cli"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/spf13/cobra"
"golang.org/x/net/context"
"vbom.ml/util/sortorder"
)

View File

@ -1,6 +1,7 @@
package node
import (
"context"
"strings"
"github.com/docker/cli/cli"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/api/types/swarm"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type psOptions struct {

View File

@ -1,11 +1,10 @@
package node
import (
"context"
"fmt"
"strings"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

View File

@ -1,6 +1,7 @@
package node
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -10,7 +11,6 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
var (

View File

@ -1,11 +1,11 @@
package plugin
import (
"context"
"io"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {

View File

@ -1,6 +1,7 @@
package plugin
import (
"context"
"encoding/json"
"fmt"
"io"
@ -15,7 +16,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
// validateTag checks if the given repoName can be resolved.

View File

@ -1,13 +1,13 @@
package plugin
import (
"context"
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
func newDisableCommand(dockerCli command.Cli) *cobra.Command {

View File

@ -1,6 +1,7 @@
package plugin
import (
"context"
"fmt"
"github.com/docker/cli/cli"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type enableOpts struct {

View File

@ -1,11 +1,12 @@
package plugin
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/inspect"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type inspectOptions struct {

View File

@ -1,6 +1,7 @@
package plugin
import (
"context"
"fmt"
"strings"
@ -14,7 +15,6 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
)
type pluginOptions struct {

View File

@ -1,12 +1,13 @@
package plugin
import (
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/cli/opts"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type listOptions struct {

View File

@ -1,7 +1,7 @@
package plugin
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -1,13 +1,13 @@
package plugin
import (
"context"
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type rmOptions struct {

View File

@ -1,7 +1,7 @@
package plugin
import (
"golang.org/x/net/context"
"context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"

View File

@ -2,6 +2,7 @@ package command
import (
"bufio"
"context"
"encoding/base64"
"encoding/json"
"fmt"
@ -16,7 +17,6 @@ import (
"github.com/docker/docker/pkg/term"
"github.com/docker/docker/registry"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
// ElectAuthServer returns the default registry to use (by asking the daemon)

View File

@ -1,12 +1,11 @@
package registry
import (
"context"
"fmt"
"io/ioutil"
"strings"
"golang.org/x/net/context"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"

Some files were not shown because too many files have changed in this diff Show More