From 1364adb2c63445016c5ed4518fc71f6a3cda6169 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 21 Jul 2016 17:18:24 +0000 Subject: [PATCH] oauth2: fix stale docs NewTransportWithCode no longer exists. Change-Id: Iccb1abc5700ecc97d6bd73313c88676e19f2c396 Reviewed-on: https://go-review.googlesource.com/25118 Reviewed-by: Mike Wiacek Reviewed-by: Brad Fitzpatrick --- example_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 @@ func ExampleConfig() { 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)