Selaa lähdekoodia

Switch from x/net/context -> context

Since Go 1.7, context is a standard package. Since about Go 1.9 time,
all x/net/context provides is a few aliases to types in context, meaning
"x/net/context" and "context" can be mixed freely.

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

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Kir Kolyshkin 7 vuotta sitten
vanhempi
commit
0f6cb61f2d
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 2 1
      libnetwork/cluster/provider.go
  2. 1 1
      libnetwork/cmd/dnet/dnet.go

+ 2 - 1
libnetwork/cluster/provider.go

@@ -1,8 +1,9 @@
 package cluster
 
 import (
+	"context"
+
 	"github.com/docker/docker/api/types/network"
-	"golang.org/x/net/context"
 )
 
 const (

+ 1 - 1
libnetwork/cmd/dnet/dnet.go

@@ -2,6 +2,7 @@ package main
 
 import (
 	"bytes"
+	"context"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -36,7 +37,6 @@ import (
 	"github.com/docker/libnetwork/types"
 	"github.com/gorilla/mux"
 	"github.com/sirupsen/logrus"
-	"golang.org/x/net/context"
 )
 
 const (