all: remove x/net/context in favour of context

Change-Id: Idbfe40e7cb9f99ca3dc7d4c214de6b9e028eefb7
Reviewed-on: https://go-review.googlesource.com/c/148277
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Jean de Klerk 2018-11-07 16:20:06 -08:00 committed by Brad Fitzpatrick
commit 42b317875d
6 changed files with 6 additions and 11 deletions

View file

@ -7,9 +7,8 @@
package errgroup package errgroup
import ( import (
"context"
"sync" "sync"
"golang.org/x/net/context"
) )
// A Group is a collection of goroutines working on subtasks that are part of // A Group is a collection of goroutines working on subtasks that are part of

View file

@ -5,6 +5,7 @@
package errgroup_test package errgroup_test
import ( import (
"context"
"crypto/md5" "crypto/md5"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
@ -12,7 +13,6 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )

View file

@ -5,13 +5,13 @@
package errgroup_test package errgroup_test
import ( import (
"context"
"errors" "errors"
"fmt" "fmt"
"net/http" "net/http"
"os" "os"
"testing" "testing"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )

View file

@ -7,12 +7,8 @@ package semaphore // import "golang.org/x/sync/semaphore"
import ( import (
"container/list" "container/list"
"context"
"sync" "sync"
// Use the old context because packages that depend on this one
// (e.g. cloud.google.com/go/...) must run on Go 1.6.
// TODO(jba): update to "context" when possible.
"golang.org/x/net/context"
) )
type waiter struct { type waiter struct {

View file

@ -7,10 +7,10 @@
package semaphore_test package semaphore_test
import ( import (
"context"
"fmt" "fmt"
"testing" "testing"
"golang.org/x/net/context"
"golang.org/x/sync/semaphore" "golang.org/x/sync/semaphore"
) )

View file

@ -5,13 +5,13 @@
package semaphore_test package semaphore_test
import ( import (
"context"
"math/rand" "math/rand"
"runtime" "runtime"
"sync" "sync"
"testing" "testing"
"time" "time"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
"golang.org/x/sync/semaphore" "golang.org/x/sync/semaphore"
) )