From 21ec57dc4fed205fde1890c0d7531aae6197b3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 1 Jul 2024 13:04:08 +0200 Subject: Update gophercloud to 2.0.0 --- gopherschwift/package.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gopherschwift') diff --git a/gopherschwift/package.go b/gopherschwift/package.go index 3c89074..769be23 100644 --- a/gopherschwift/package.go +++ b/gopherschwift/package.go @@ -19,14 +19,14 @@ /* Package gopherschwift contains a Gophercloud backend for Schwift. -If your application uses Gophercloud (https://github.com/gophercloud/gophercloud), +If your application uses Gophercloud (https://github.com/gophercloud/gophercloud/v2), you can use the Wrap() function in this package as an entrypoint to Schwift. A schwift.Account created this way will re-use Gophercloud's authentication code, so you only need to obtain a client token once using Gophercloud. For example: import ( - "github.com/gophercloud/gophercloud/openstack" - "github.com/gophercloud/utils/openstack/clientconfig" + "github.com/gophercloud/gophercloud/v2/openstack" + "github.com/gophercloud/utils/v2/openstack/clientconfig" "github.com/majewsky/schwift/gopherschwift" ) @@ -43,7 +43,7 @@ import ( "io" "net/http" - "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/v2" "github.com/majewsky/schwift" ) @@ -114,7 +114,7 @@ func (g *backend) do(req *http.Request, afterReauth bool) (*http.Response, error if err != nil { return nil, err } - err = provider.Reauthenticate(resp.Request.Header.Get("X-Auth-Token")) + err = provider.Reauthenticate(req.Context(), resp.Request.Header.Get("X-Auth-Token")) if err != nil { return nil, err } -- cgit v1.2.3