Skip to content

Commit 0f99b2e

Browse files
committed
Migrate golang.org/x/net/context to context.
Note: this breaks compatibility with Go versions prior to Go 1.7.
1 parent 860ed7f commit 0f99b2e

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

auth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
package auth
33

44
import (
5+
"context"
56
"net/http"
6-
7-
"golang.org/x/net/context"
87
)
98

109
// AuthenticatedRequest is passed to AuthenticatedHandlerFunc instead

basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package auth
22

33
import (
44
"bytes"
5+
"context"
56
"crypto/sha1"
67
"crypto/subtle"
78
"encoding/base64"
@@ -10,7 +11,6 @@ import (
1011
"strings"
1112

1213
"golang.org/x/crypto/bcrypt"
13-
"golang.org/x/net/context"
1414
)
1515

1616
type compareFunc func(hashedPassword, password []byte) error

digest.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package auth
22

33
import (
4+
"context"
45
"crypto/subtle"
56
"fmt"
67
"net/http"
@@ -10,8 +11,6 @@ import (
1011
"strings"
1112
"sync"
1213
"time"
13-
14-
"golang.org/x/net/context"
1514
)
1615

1716
type digestClient struct {

examples/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package main
1212

1313
import (
14+
"context"
1415
"fmt"
1516
"net/http"
1617

1718
auth ".."
18-
"golang.org/x/net/context"
1919
)
2020

2121
func secret(user, realm string) string {

0 commit comments

Comments
 (0)