all: use stdlib context instead of x/net/context

This PR replaces use of `x/net/context` with the standard `context`

It has been nearly 6 months since
https://github.com/golang/oauth2/issues/246#issuecomment-387601277 so
I made this PR so it will be ready to merge when needed (and if
possible).

Fixes #246

Change-Id: Id2c316fcb27de0fb9163ceb4e8669b04cb39a987
GitHub-Last-Rev: 5b36321dccef8da97d67188fe307d1c135793ad6
GitHub-Pull-Request: golang/oauth2#339
Reviewed-on: https://go-review.googlesource.com/c/145202
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Antoine GIRARD
2018-11-01 15:53:36 +00:00
committed by Brad Fitzpatrick
parent 5a69e67f3f
commit c453e0c757
16 changed files with 21 additions and 20 deletions

View File

@@ -5,6 +5,7 @@
package internal
import (
"context"
"encoding/json"
"errors"
"fmt"
@@ -17,7 +18,6 @@ import (
"strings"
"time"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
)

View File

@@ -5,14 +5,13 @@
package internal
import (
"context"
"fmt"
"io"
"net/http"
"net/http/httptest"
"net/url"
"testing"
"golang.org/x/net/context"
)
func TestRegisterBrokenAuthHeaderProvider(t *testing.T) {

View File

@@ -5,9 +5,8 @@
package internal
import (
"context"
"net/http"
"golang.org/x/net/context"
)
// HTTPClient is the context key to use with golang.org/x/net/context's