diff --git a/errgroup/errgroup.go b/errgroup/errgroup.go index 533438d..9857fe5 100644 --- a/errgroup/errgroup.go +++ b/errgroup/errgroup.go @@ -7,9 +7,8 @@ package errgroup import ( + "context" "sync" - - "golang.org/x/net/context" ) // A Group is a collection of goroutines working on subtasks that are part of diff --git a/errgroup/errgroup_example_md5all_test.go b/errgroup/errgroup_example_md5all_test.go index 714b5ae..739b336 100644 --- a/errgroup/errgroup_example_md5all_test.go +++ b/errgroup/errgroup_example_md5all_test.go @@ -5,6 +5,7 @@ package errgroup_test import ( + "context" "crypto/md5" "fmt" "io/ioutil" @@ -12,7 +13,6 @@ import ( "os" "path/filepath" - "golang.org/x/net/context" "golang.org/x/sync/errgroup" ) diff --git a/errgroup/errgroup_test.go b/errgroup/errgroup_test.go index 6a9696e..889323f 100644 --- a/errgroup/errgroup_test.go +++ b/errgroup/errgroup_test.go @@ -5,13 +5,13 @@ package errgroup_test import ( + "context" "errors" "fmt" "net/http" "os" "testing" - "golang.org/x/net/context" "golang.org/x/sync/errgroup" ) diff --git a/semaphore/semaphore.go b/semaphore/semaphore.go index e9d2d79..2096ca3 100644 --- a/semaphore/semaphore.go +++ b/semaphore/semaphore.go @@ -7,12 +7,8 @@ package semaphore // import "golang.org/x/sync/semaphore" import ( "container/list" + "context" "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 { diff --git a/semaphore/semaphore_bench_test.go b/semaphore/semaphore_bench_test.go index 1e3ab75..f96d349 100644 --- a/semaphore/semaphore_bench_test.go +++ b/semaphore/semaphore_bench_test.go @@ -7,10 +7,10 @@ package semaphore_test import ( + "context" "fmt" "testing" - "golang.org/x/net/context" "golang.org/x/sync/semaphore" ) diff --git a/semaphore/semaphore_test.go b/semaphore/semaphore_test.go index 2541b90..b5f8f13 100644 --- a/semaphore/semaphore_test.go +++ b/semaphore/semaphore_test.go @@ -5,13 +5,13 @@ package semaphore_test import ( + "context" "math/rand" "runtime" "sync" "testing" "time" - "golang.org/x/net/context" "golang.org/x/sync/errgroup" "golang.org/x/sync/semaphore" )