@@ -17,7 +17,7 @@ import (
17
17
)
18
18
19
19
func ExampleDefaultClient () {
20
- client , err := google .DefaultClient (oauth2 . NoContext ,
20
+ client , err := google .DefaultClient (context . Background () ,
21
21
"https://www.googleapis.com/auth/devstorage.full_control" )
22
22
if err != nil {
23
23
log .Fatal (err )
@@ -44,11 +44,11 @@ func Example_webServer() {
44
44
fmt .Printf ("Visit the URL for the auth dialog: %v" , url )
45
45
46
46
// 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" )
48
48
if err != nil {
49
49
log .Fatal (err )
50
50
}
51
- client := conf .Client (oauth2 . NoContext , tok )
51
+ client := conf .Client (context . Background () , tok )
52
52
client .Get ("..." )
53
53
}
54
54
@@ -71,7 +71,7 @@ func ExampleJWTConfigFromJSON() {
71
71
// Initiate an http.Client. The following GET request will be
72
72
// authorized and authenticated on the behalf of
73
73
// your service account.
74
- client := conf .Client (oauth2 . NoContext )
74
+ client := conf .Client (context . Background () )
75
75
client .Get ("..." )
76
76
}
77
77
@@ -84,7 +84,7 @@ func ExampleSDKConfig() {
84
84
}
85
85
// Initiate an http.Client. The following GET request will be
86
86
// authorized and authenticated on the behalf of the SDK user.
87
- client := conf .Client (oauth2 . NoContext )
87
+ client := conf .Client (context . Background () )
88
88
client .Get ("..." )
89
89
}
90
90
@@ -116,7 +116,7 @@ func Example_serviceAccount() {
116
116
}
117
117
// Initiate an http.Client, the following GET request will be
118
118
// authorized and authenticated on the behalf of [email protected] .
119
- client := conf .Client (oauth2 . NoContext )
119
+ client := conf .Client (context . Background () )
120
120
client .Get ("..." )
121
121
}
122
122
0 commit comments