1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 17:27:25 +00:00

Merge pull request #2967 from gottwald/fix-deprctd-gs-constructor

Replace deprecated method in gs backend
This commit is contained in:
MichaelEischer 2020-10-01 11:01:49 +02:00 committed by GitHub
commit 4df8861e09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ import (
"golang.org/x/oauth2" "golang.org/x/oauth2"
"golang.org/x/oauth2/google" "golang.org/x/oauth2/google"
"google.golang.org/api/googleapi" "google.golang.org/api/googleapi"
"google.golang.org/api/option"
storage "google.golang.org/api/storage/v1" storage "google.golang.org/api/storage/v1"
) )
@ -66,7 +67,7 @@ func getStorageService(rt http.RoundTripper) (*storage.Service, error) {
client := oauth2.NewClient(ctx, ts) client := oauth2.NewClient(ctx, ts)
service, err := storage.New(client) service, err := storage.NewService(ctx, option.WithHTTPClient(client))
if err != nil { if err != nil {
return nil, err return nil, err
} }