mirror of
https://github.com/rclone/rclone.git
synced 2025-12-27 13:43:19 +00:00
vendor: update all dependencies
This commit is contained in:
16
vendor/golang.org/x/oauth2/google/example_test.go
generated
vendored
16
vendor/golang.org/x/oauth2/google/example_test.go
generated
vendored
@@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build appenginevm appengine
|
||||
|
||||
package google_test
|
||||
|
||||
import (
|
||||
@@ -12,6 +10,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
"golang.org/x/oauth2/jwt"
|
||||
@@ -148,3 +147,16 @@ func ExampleComputeTokenSource() {
|
||||
}
|
||||
client.Get("...")
|
||||
}
|
||||
|
||||
func ExampleCredentialsFromJSON() {
|
||||
ctx := context.Background()
|
||||
data, err := ioutil.ReadFile("/path/to/key-file.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
creds, err := google.CredentialsFromJSON(ctx, data, "https://www.googleapis.com/auth/bigquery")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
_ = creds // TODO: Use creds.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user