mirror of
https://github.com/restic/restic.git
synced 2024-12-24 00:37:28 +00:00
Replace deprecated method in gs backend
This commit is contained in:
parent
f361ed66de
commit
00cedd22aa
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/google"
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/option"
|
||||
storage "google.golang.org/api/storage/v1"
|
||||
)
|
||||
|
||||
|
@ -66,7 +67,7 @@ func getStorageService(rt http.RoundTripper) (*storage.Service, error) {
|
|||
|
||||
client := oauth2.NewClient(ctx, ts)
|
||||
|
||||
service, err := storage.New(client)
|
||||
service, err := storage.NewService(ctx, option.WithHTTPClient(client))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue