oauth2: fix stale docs
NewTransportWithCode no longer exists.
Change-Id: Iccb1abc5700ecc97d6bd73313c88676e19f2c396
Reviewed-on: https://go-review.googlesource.com/25118
Reviewed-by: Mike Wiacek <mjwiacek@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/example_test.go b/example_test.go
index 33b305c..f5ac863 100644
--- a/example_test.go
+++ b/example_test.go
@@ -27,10 +27,10 @@
url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline)
fmt.Printf("Visit the URL for the auth dialog: %v", url)
- // Use the authorization code that is pushed to the redirect URL.
- // NewTransportWithCode will do the handshake to retrieve
- // an access token and initiate a Transport that is
- // authorized and authenticated by the retrieved token.
+ // Use the authorization code that is pushed to the redirect
+ // URL. Exchange will do the handshake to retrieve the
+ // initial access token. The HTTP Client returned by
+ // conf.Client will refresh the token as necessary.
var code string
if _, err := fmt.Scan(&code); err != nil {
log.Fatal(err)