diff --git a/cmd/containerd/command/main.go b/cmd/containerd/command/main.go index 274135757..8fba0fa38 100644 --- a/cmd/containerd/command/main.go +++ b/cmd/containerd/command/main.go @@ -17,7 +17,7 @@ package command import ( - "context" + gocontext "context" "fmt" "io/ioutil" golog "log" @@ -35,7 +35,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli" - gocontext "golang.org/x/net/context" "google.golang.org/grpc/grpclog" ) @@ -168,7 +167,7 @@ func App() *cli.App { return app } -func serve(ctx context.Context, l net.Listener, serveFunc func(net.Listener) error) { +func serve(ctx gocontext.Context, l net.Listener, serveFunc func(net.Listener) error) { path := l.Addr().String() log.G(ctx).WithField("address", path).Info("serving...") go func() { diff --git a/services/images/local.go b/services/images/local.go index 1cca1a42a..116c4e432 100644 --- a/services/images/local.go +++ b/services/images/local.go @@ -17,7 +17,7 @@ package images import ( - gocontext "context" + "context" eventstypes "github.com/containerd/containerd/api/events" imagesapi "github.com/containerd/containerd/api/services/images/v1" @@ -30,7 +30,6 @@ import ( "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/services" ptypes "github.com/gogo/protobuf/types" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -64,7 +63,7 @@ func init() { } type gcScheduler interface { - ScheduleAndWait(gocontext.Context) (gc.Stats, error) + ScheduleAndWait(context.Context) (gc.Stats, error) } type local struct { diff --git a/services/snapshots/service.go b/services/snapshots/service.go index 1d10fae1e..8ef7a47f5 100644 --- a/services/snapshots/service.go +++ b/services/snapshots/service.go @@ -17,7 +17,7 @@ package snapshots import ( - gocontext "context" + "context" snapshotsapi "github.com/containerd/containerd/api/services/snapshots/v1" "github.com/containerd/containerd/api/types" @@ -29,7 +29,6 @@ import ( "github.com/containerd/containerd/snapshots" ptypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" ) @@ -216,7 +215,7 @@ func (s *service) List(sr *snapshotsapi.ListSnapshotsRequest, ss snapshotsapi.Sn }) } ) - err = sn.Walk(ss.Context(), func(ctx gocontext.Context, info snapshots.Info) error { + err = sn.Walk(ss.Context(), func(ctx context.Context, info snapshots.Info) error { buffer = append(buffer, fromInfo(info)) if len(buffer) >= 100 {