diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-10-08 16:02:50 -0500 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-10-08 16:02:50 -0500 |
commit | baf7141d1dd0f99d561a2197a909c66dd389809d (patch) | |
tree | 92c176f713b0b28893344261b1e567db5e30ba79 /vendor/go4.org/wkfs/gcs | |
parent | 696aebffe56853345d679d4d2b3051236423c6db (diff) |
Update dependencies
Diffstat (limited to 'vendor/go4.org/wkfs/gcs')
-rw-r--r-- | vendor/go4.org/wkfs/gcs/gcs.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/vendor/go4.org/wkfs/gcs/gcs.go b/vendor/go4.org/wkfs/gcs/gcs.go index 21f2551..a970c75 100644 --- a/vendor/go4.org/wkfs/gcs/gcs.go +++ b/vendor/go4.org/wkfs/gcs/gcs.go @@ -32,13 +32,13 @@ import ( "strings" "time" + "cloud.google.com/go/compute/metadata" + "cloud.google.com/go/storage" "go4.org/wkfs" "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" - "google.golang.org/cloud" - "google.golang.org/cloud/compute/metadata" - "google.golang.org/cloud/storage" + "google.golang.org/api/option" ) // Max size for all files read, because we use a bytes.Reader as our file @@ -56,13 +56,8 @@ func init() { registerBrokenFS(fmt.Errorf("could not get http client for context: %v", err)) return } - projID, err := metadata.ProjectID() - if projID == "" || err != nil { - registerBrokenFS(fmt.Errorf("could not get GCE project ID: %v", err)) - return - } - ctx := cloud.NewContext(projID, hc) - sc, err := storage.NewClient(ctx) + ctx := context.Background() + sc, err := storage.NewClient(ctx, option.WithHTTPClient(hc)) if err != nil { registerBrokenFS(fmt.Errorf("could not get cloud storage client: %v", err)) return |