Skip to content

Commit 42b3178

Browse files
jeanbzabradfitz
authored andcommitted
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>
1 parent 1d60e46 commit 42b3178

File tree

6 files changed

+6
-11
lines changed

6 files changed

+6
-11
lines changed

errgroup/errgroup.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
package errgroup
88

99
import (
10+
"context"
1011
"sync"
11-
12-
"golang.org/x/net/context"
1312
)
1413

1514
// A Group is a collection of goroutines working on subtasks that are part of

errgroup/errgroup_example_md5all_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
package errgroup_test
66

77
import (
8+
"context"
89
"crypto/md5"
910
"fmt"
1011
"io/ioutil"
1112
"log"
1213
"os"
1314
"path/filepath"
1415

15-
"golang.org/x/net/context"
1616
"golang.org/x/sync/errgroup"
1717
)
1818

errgroup/errgroup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
package errgroup_test
66

77
import (
8+
"context"
89
"errors"
910
"fmt"
1011
"net/http"
1112
"os"
1213
"testing"
1314

14-
"golang.org/x/net/context"
1515
"golang.org/x/sync/errgroup"
1616
)
1717

semaphore/semaphore.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ package semaphore // import "golang.org/x/sync/semaphore"
77

88
import (
99
"container/list"
10+
"context"
1011
"sync"
11-
12-
// Use the old context because packages that depend on this one
13-
// (e.g. cloud.google.com/go/...) must run on Go 1.6.
14-
// TODO(jba): update to "context" when possible.
15-
"golang.org/x/net/context"
1612
)
1713

1814
type waiter struct {

semaphore/semaphore_bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
package semaphore_test
88

99
import (
10+
"context"
1011
"fmt"
1112
"testing"
1213

13-
"golang.org/x/net/context"
1414
"golang.org/x/sync/semaphore"
1515
)
1616

semaphore/semaphore_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
package semaphore_test
66

77
import (
8+
"context"
89
"math/rand"
910
"runtime"
1011
"sync"
1112
"testing"
1213
"time"
1314

14-
"golang.org/x/net/context"
1515
"golang.org/x/sync/errgroup"
1616
"golang.org/x/sync/semaphore"
1717
)

0 commit comments

Comments
 (0)