@@ -17,7 +17,7 @@ import (
1717)
1818
1919func ExampleDefaultClient () {
20- client , err := google .DefaultClient (oauth2 . NoContext ,
20+ client , err := google .DefaultClient (context . Background () ,
2121 "https://www.googleapis.com/auth/devstorage.full_control" )
2222 if err != nil {
2323 log .Fatal (err )
@@ -44,11 +44,11 @@ func Example_webServer() {
4444 fmt .Printf ("Visit the URL for the auth dialog: %v" , url )
4545
4646 // Handle the exchange code to initiate a transport.
47- tok , err := conf .Exchange (oauth2 . NoContext , "authorization-code" )
47+ tok , err := conf .Exchange (context . Background () , "authorization-code" )
4848 if err != nil {
4949 log .Fatal (err )
5050 }
51- client := conf .Client (oauth2 . NoContext , tok )
51+ client := conf .Client (context . Background () , tok )
5252 client .Get ("..." )
5353}
5454
@@ -71,7 +71,7 @@ func ExampleJWTConfigFromJSON() {
7171 // Initiate an http.Client. The following GET request will be
7272 // authorized and authenticated on the behalf of
7373 // your service account.
74- client := conf .Client (oauth2 . NoContext )
74+ client := conf .Client (context . Background () )
7575 client .Get ("..." )
7676}
7777
@@ -84,7 +84,7 @@ func ExampleSDKConfig() {
8484 }
8585 // Initiate an http.Client. The following GET request will be
8686 // authorized and authenticated on the behalf of the SDK user.
87- client := conf .Client (oauth2 . NoContext )
87+ client := conf .Client (context . Background () )
8888 client .Get ("..." )
8989}
9090
@@ -116,7 +116,7 @@ func Example_serviceAccount() {
116116 }
117117 // Initiate an http.Client, the following GET request will be
118118 // authorized and authenticated on the behalf of [email protected] . 119- client := conf .Client (oauth2 . NoContext )
119+ client := conf .Client (context . Background () )
120120 client .Get ("..." )
121121}
122122
0 commit comments