Switch from x/net/context -> context

Since Go 1.7, context is a standard package. Since Go 1.9, everything
that is provided by "x/net/context" is a couple of type aliases to
types in "context".

Many vendored packages still use x/net/context, so vendor entry remains
for now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2018-04-19 15:30:59 -07:00
parent 5c233cf431
commit 7d62e40f7e
346 changed files with 369 additions and 426 deletions

View file

@ -1,6 +1,7 @@
package build // import "github.com/docker/docker/api/server/backend/build"
import (
"context"
"fmt"
"github.com/docker/distribution/reference"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/image"
"github.com/docker/docker/pkg/stringid"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
// ImageComponent provides an interface for working with images

View file

@ -1,6 +1,7 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
import (
"context"
"io"
"mime"
"net/http"
@ -9,7 +10,6 @@ import (
"github.com/docker/docker/errdefs"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type contextKey string

View file

@ -1,13 +1,12 @@
package httputils // import "github.com/docker/docker/api/server/httputils"
import (
"context"
"fmt"
"io"
"net/url"
"sort"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/pkg/ioutils"

View file

@ -1,10 +1,10 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"context"
"net/http"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// CORSMiddleware injects CORS headers to each request

View file

@ -2,6 +2,7 @@ package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"bufio"
"context"
"encoding/json"
"io"
"net/http"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/pkg/ioutils"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// DebugRequestMiddleware dumps the request to logger

View file

@ -1,9 +1,8 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"context"
"net/http"
"golang.org/x/net/context"
)
// ExperimentalMiddleware is a the middleware in charge of adding the

View file

@ -1,9 +1,8 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"context"
"net/http"
"golang.org/x/net/context"
)
// Middleware is an interface to allow the use of ordinary functions as Docker API filters.

View file

@ -1,13 +1,13 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"context"
"fmt"
"net/http"
"runtime"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types/versions"
"golang.org/x/net/context"
)
// VersionMiddleware is a middleware that

View file

@ -1,6 +1,7 @@
package middleware // import "github.com/docker/docker/api/server/middleware"
import (
"context"
"net/http"
"net/http/httptest"
"runtime"
@ -9,7 +10,6 @@ import (
"github.com/docker/docker/api/server/httputils"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestVersionMiddlewareVersion(t *testing.T) {

View file

@ -1,9 +1,10 @@
package build // import "github.com/docker/docker/api/server/router/build"
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"golang.org/x/net/context"
)
// Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.

View file

@ -2,6 +2,7 @@ package build // import "github.com/docker/docker/api/server/router/build"
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
@ -25,7 +26,6 @@ import (
units "github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type invalidIsolationError string

View file

@ -1,12 +1,12 @@
package checkpoint // import "github.com/docker/docker/api/server/router/checkpoint"
import (
"context"
"encoding/json"
"net/http"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func (s *checkpointRouter) postContainerCheckpoint(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,10 +1,9 @@
package container // import "github.com/docker/docker/api/server/router/container"
import (
"context"
"io"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/container"

View file

@ -1,6 +1,7 @@
package container // import "github.com/docker/docker/api/server/router/container"
import (
"context"
"encoding/json"
"fmt"
"io"
@ -20,7 +21,6 @@ import (
"github.com/docker/docker/pkg/signal"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"golang.org/x/net/websocket"
)

View file

@ -3,6 +3,7 @@ package container // import "github.com/docker/docker/api/server/router/containe
import (
"compress/flate"
"compress/gzip"
"context"
"encoding/base64"
"encoding/json"
"io"
@ -12,7 +13,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/versions"
gddohttputil "github.com/golang/gddo/httputil"
"golang.org/x/net/context"
)
type pathError struct{}

View file

@ -1,6 +1,7 @@
package container // import "github.com/docker/docker/api/server/router/container"
import (
"context"
"encoding/json"
"fmt"
"io"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/stdcopy"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func (s *containerRouter) getExecByID(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,10 +1,10 @@
package container // import "github.com/docker/docker/api/server/router/container"
import (
"context"
"net/http"
"github.com/docker/docker/api/server/httputils"
"golang.org/x/net/context"
)
// getContainersByName inspects container's configuration and serializes it as json.

View file

@ -1,13 +1,13 @@
package debug // import "github.com/docker/docker/api/server/router/debug"
import (
"context"
"expvar"
"net/http"
"net/http/pprof"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/server/router"
"golang.org/x/net/context"
)
// NewRouter creates a new debug router

View file

@ -1,10 +1,9 @@
package debug // import "github.com/docker/docker/api/server/router/debug"
import (
"context"
"net/http"
"net/http/pprof"
"golang.org/x/net/context"
)
func handlePprof(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,10 +1,11 @@
package distribution // import "github.com/docker/docker/api/server/router/distribution"
import (
"context"
"github.com/docker/distribution"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// Backend is all the methods that need to be implemented

View file

@ -1,6 +1,7 @@
package distribution // import "github.com/docker/docker/api/server/router/distribution"
import (
"context"
"encoding/base64"
"encoding/json"
"net/http"
@ -15,7 +16,6 @@ import (
registrytypes "github.com/docker/docker/api/types/registry"
"github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func (s *distributionRouter) getDistributionInfo(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,10 +1,9 @@
package router // import "github.com/docker/docker/api/server/router"
import (
"context"
"net/http"
"golang.org/x/net/context"
"github.com/docker/docker/api/server/httputils"
)

View file

@ -1,13 +1,13 @@
package image // import "github.com/docker/docker/api/server/router/image"
import (
"context"
"io"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/registry"
"golang.org/x/net/context"
)
// Backend is all the methods that need to be implemented

View file

@ -1,6 +1,7 @@
package image // import "github.com/docker/docker/api/server/router/image"
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
@ -19,7 +20,6 @@ import (
"github.com/docker/docker/registry"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
// Creates an image from Pull or from Import

View file

@ -1,10 +1,10 @@
package router // import "github.com/docker/docker/api/server/router"
import (
"context"
"net/http"
"github.com/docker/docker/api/server/httputils"
"golang.org/x/net/context"
)
// RouteWrapper wraps a route with extra functionality.

View file

@ -1,7 +1,7 @@
package network // import "github.com/docker/docker/api/server/router/network"
import (
"golang.org/x/net/context"
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"

View file

@ -1,13 +1,12 @@
package network // import "github.com/docker/docker/api/server/router/network"
import (
"context"
"encoding/json"
"net/http"
"strconv"
"strings"
"golang.org/x/net/context"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"

View file

@ -1,6 +1,7 @@
package plugin // import "github.com/docker/docker/api/server/router/plugin"
import (
"context"
"io"
"net/http"
@ -8,7 +9,6 @@ import (
enginetypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/plugin"
"golang.org/x/net/context"
)
// Backend for Plugin

View file

@ -1,6 +1,7 @@
package plugin // import "github.com/docker/docker/api/server/router/plugin"
import (
"context"
"encoding/base64"
"encoding/json"
"net/http"
@ -14,7 +15,6 @@ import (
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/streamformatter"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func parseHeaders(headers http.Header) (map[string][]string, *types.AuthConfig) {

View file

@ -1,9 +1,8 @@
package session // import "github.com/docker/docker/api/server/router/session"
import (
"context"
"net/http"
"golang.org/x/net/context"
)
// Backend abstracts an session receiver from an http request.

View file

@ -1,10 +1,10 @@
package session // import "github.com/docker/docker/api/server/router/session"
import (
"context"
"net/http"
"github.com/docker/docker/errdefs"
"golang.org/x/net/context"
)
func (sr *sessionRouter) startSession(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,10 +1,11 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
import (
"context"
basictypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
types "github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// Backend abstracts a swarm manager.

View file

@ -1,6 +1,7 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
import (
"context"
"encoding/json"
"fmt"
"net/http"
@ -15,7 +16,6 @@ import (
"github.com/docker/docker/errdefs"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func (sr *swarmRouter) initCluster(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,6 +1,7 @@
package swarm // import "github.com/docker/docker/api/server/router/swarm"
import (
"context"
"fmt"
"io"
"net/http"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/server/httputils"
basictypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/backend"
"golang.org/x/net/context"
)
// swarmLogs takes an http response, request, and selector, and writes the logs

View file

@ -1,13 +1,13 @@
package system // import "github.com/docker/docker/api/server/router/system"
import (
"context"
"time"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// Backend is the methods that need to be implemented to provide

View file

@ -1,6 +1,7 @@
package system // import "github.com/docker/docker/api/server/router/system"
import (
"context"
"encoding/json"
"fmt"
"net/http"
@ -16,7 +17,6 @@ import (
"github.com/docker/docker/pkg/ioutils"
pkgerrors "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
func optionsHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,7 +1,7 @@
package volume // import "github.com/docker/docker/api/server/router/volume"
import (
"golang.org/x/net/context"
"context"
// TODO return types need to be refactored into pkg
"github.com/docker/docker/api/types"

View file

@ -1,6 +1,7 @@
package volume // import "github.com/docker/docker/api/server/router/volume"
import (
"context"
"encoding/json"
"errors"
"io"
@ -10,7 +11,6 @@ import (
"github.com/docker/docker/api/types/filters"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/errdefs"
"golang.org/x/net/context"
)
func (v *volumeRouter) getVolumesList(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -1,6 +1,7 @@
package server // import "github.com/docker/docker/api/server"
import (
"context"
"crypto/tls"
"net"
"net/http"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/dockerversion"
"github.com/gorilla/mux"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
// versionMatcher defines a variable matcher to be parsed by the router

View file

@ -6,11 +6,11 @@ import (
"strings"
"testing"
"context"
"github.com/docker/docker/api"
"github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/server/middleware"
"golang.org/x/net/context"
)
func TestMiddlewares(t *testing.T) {

View file

@ -5,6 +5,7 @@
package builder // import "github.com/docker/docker/builder"
import (
"context"
"io"
"github.com/docker/docker/api/types"
@ -14,7 +15,6 @@ import (
"github.com/docker/docker/image"
"github.com/docker/docker/layer"
"github.com/docker/docker/pkg/containerfs"
"golang.org/x/net/context"
)
const (

View file

@ -2,6 +2,7 @@ package dockerfile // import "github.com/docker/docker/builder/dockerfile"
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
@ -25,7 +26,6 @@ import (
"github.com/moby/buildkit/session"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"golang.org/x/sync/syncmap"
)

View file

@ -1,6 +1,7 @@
package dockerfile // import "github.com/docker/docker/builder/dockerfile"
import (
"context"
"time"
"github.com/docker/docker/builder/fscache"
@ -8,7 +9,6 @@ import (
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/filesync"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
const sessionConnectTimeout = 5 * time.Second

View file

@ -1,6 +1,7 @@
package dockerfile // import "github.com/docker/docker/builder/dockerfile"
import (
"context"
"fmt"
"io"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type containerManager struct {

View file

@ -1,6 +1,7 @@
package dockerfile // import "github.com/docker/docker/builder/dockerfile"
import (
"context"
"runtime"
"github.com/docker/docker/api/types/backend"
@ -8,7 +9,6 @@ import (
dockerimage "github.com/docker/docker/image"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
type getAndMountFunc func(string, bool, string) (builder.Image, builder.ROLayer, error)

View file

@ -1,6 +1,7 @@
package dockerfile // import "github.com/docker/docker/builder/dockerfile"
import (
"context"
"encoding/json"
"io"
"runtime"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/image"
"github.com/docker/docker/layer"
"github.com/docker/docker/pkg/containerfs"
"golang.org/x/net/context"
)
// MockBackend implements the builder.Backend interface for unit testing

View file

@ -2,6 +2,7 @@ package fscache // import "github.com/docker/docker/builder/fscache"
import (
"archive/tar"
"context"
"crypto/sha256"
"encoding/json"
"hash"
@ -22,7 +23,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/tonistiigi/fsutil"
"golang.org/x/net/context"
"golang.org/x/sync/singleflight"
)

View file

@ -1,6 +1,7 @@
package fscache // import "github.com/docker/docker/builder/fscache"
import (
"context"
"io/ioutil"
"os"
"path/filepath"
@ -10,7 +11,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/moby/buildkit/session/filesync"
"golang.org/x/net/context"
)
func TestFSCache(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"fmt"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// BuildCachePrune requests the daemon to delete unused cache data

View file

@ -1,8 +1,9 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// CheckpointCreate creates a checkpoint from the given container with the given name

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -10,7 +11,6 @@ import (
"testing"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func TestCheckpointCreateError(t *testing.T) {

View file

@ -1,10 +1,10 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// CheckpointDelete deletes the checkpoint with the given name from the given container

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
@ -9,7 +10,6 @@ import (
"testing"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func TestCheckpointDeleteError(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// CheckpointList returns the checkpoints of the given container in the docker host

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -10,7 +11,6 @@ import (
"testing"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func TestCheckpointListError(t *testing.T) {

View file

@ -42,6 +42,7 @@ For example, to list running containers (the equivalent of "docker ps"):
package client // import "github.com/docker/docker/client"
import (
"context"
"fmt"
"net"
"net/http"
@ -57,7 +58,6 @@ import (
"github.com/docker/go-connections/sockets"
"github.com/docker/go-connections/tlsconfig"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
// ErrRedirect is the error returned by checkRedirect when the request is non-GET.

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// ConfigCreate creates a new Config.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestConfigCreateUnsupported(t *testing.T) {

View file

@ -2,11 +2,11 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// ConfigInspectWithRaw returns the config information with raw data

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -13,7 +14,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestConfigInspectNotFound(t *testing.T) {

View file

@ -1,13 +1,13 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// ConfigList returns the list of configs.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -14,7 +15,6 @@ import (
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestConfigListUnsupported(t *testing.T) {

View file

@ -1,6 +1,6 @@
package client // import "github.com/docker/docker/client"
import "golang.org/x/net/context"
import "context"
// ConfigRemove removes a Config.
func (cli *Client) ConfigRemove(ctx context.Context, id string) error {

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
@ -10,7 +11,6 @@ import (
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestConfigRemoveUnsupported(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"strconv"
"github.com/docker/docker/api/types/swarm"
"golang.org/x/net/context"
)
// ConfigUpdate attempts to update a Config

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/api/types/swarm"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestConfigUpdateUnsupported(t *testing.T) {

View file

@ -1,10 +1,10 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerAttach attaches a connection to a container in the server.

View file

@ -1,13 +1,13 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"errors"
"net/url"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerCommit applies changes into a container and creates a new tagged image.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -10,7 +11,6 @@ import (
"testing"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func TestContainerCommitError(t *testing.T) {

View file

@ -1,6 +1,7 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
@ -10,8 +11,6 @@ import (
"path/filepath"
"strings"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
)

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
@ -10,8 +11,6 @@ import (
"strings"
"testing"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
)

View file

@ -1,6 +1,7 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"strings"
@ -8,7 +9,6 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/versions"
"golang.org/x/net/context"
)
type configWrapper struct {

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -10,7 +11,6 @@ import (
"testing"
"github.com/docker/docker/api/types/container"
"golang.org/x/net/context"
)
func TestContainerCreateError(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"github.com/docker/docker/api/types/container"
"golang.org/x/net/context"
)
// ContainerDiff shows differences in a container filesystem since it was started.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -10,7 +11,6 @@ import (
"testing"
"github.com/docker/docker/api/types/container"
"golang.org/x/net/context"
)
func TestContainerDiffError(t *testing.T) {

View file

@ -1,10 +1,10 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerExecCreate creates a new exec configuration to run an exec process.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -9,8 +10,6 @@ import (
"strings"
"testing"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
)

View file

@ -1,10 +1,9 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"io"
"net/url"
"golang.org/x/net/context"
)
// ContainerExport retrieves the raw contents of a container

View file

@ -2,13 +2,12 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
)
func TestContainerExportError(t *testing.T) {

View file

@ -2,12 +2,12 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"net/url"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerInspect returns the container information.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"golang.org/x/net/context"
)
func TestContainerInspectError(t *testing.T) {

View file

@ -1,9 +1,8 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"golang.org/x/net/context"
)
// ContainerKill terminates the container process but does not remove the container from the docker host.

View file

@ -2,13 +2,12 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
)
func TestContainerKillError(t *testing.T) {

View file

@ -1,13 +1,13 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"strconv"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"golang.org/x/net/context"
)
// ContainerList returns the list of containers in the docker host.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"golang.org/x/net/context"
)
func TestContainerListError(t *testing.T) {

View file

@ -1,12 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"io"
"net/url"
"time"
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
timetypes "github.com/docker/docker/api/types/time"
)

View file

@ -12,10 +12,10 @@ import (
"testing"
"time"
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/internal/testutil"
"golang.org/x/net/context"
)
func TestContainerLogsNotFoundError(t *testing.T) {

View file

@ -1,6 +1,6 @@
package client // import "github.com/docker/docker/client"
import "golang.org/x/net/context"
import "context"
// ContainerPause pauses the main process of a given container without terminating it.
func (cli *Client) ContainerPause(ctx context.Context, containerID string) error {

View file

@ -2,13 +2,12 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
)
func TestContainerPauseError(t *testing.T) {

View file

@ -1,12 +1,12 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"fmt"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"golang.org/x/net/context"
)
// ContainersPrune requests the daemon to delete unused data

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
@ -13,7 +14,6 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestContainersPruneError(t *testing.T) {

View file

@ -1,10 +1,10 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerRemove kills and removes a container from the docker host.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
@ -11,7 +12,6 @@ import (
"github.com/docker/docker/api/types"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"golang.org/x/net/context"
)
func TestContainerRemoveError(t *testing.T) {

View file

@ -1,9 +1,8 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"golang.org/x/net/context"
)
// ContainerRename changes the name of a given container.

View file

@ -2,13 +2,12 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
)
func TestContainerRenameError(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"strconv"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
// ContainerResize changes the size of the tty for a container.

View file

@ -2,6 +2,7 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
@ -9,7 +10,6 @@ import (
"testing"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
func TestContainerResizeError(t *testing.T) {

View file

@ -1,11 +1,11 @@
package client // import "github.com/docker/docker/client"
import (
"context"
"net/url"
"time"
timetypes "github.com/docker/docker/api/types/time"
"golang.org/x/net/context"
)
// ContainerRestart stops and starts a container again.

View file

@ -2,14 +2,13 @@ package client // import "github.com/docker/docker/client"
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"time"
"golang.org/x/net/context"
)
func TestContainerRestartError(t *testing.T) {

View file

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

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