diff options
| author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-07-01 13:04:08 +0200 |
|---|---|---|
| committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-07-01 13:04:08 +0200 |
| commit | 21ec57dc4fed205fde1890c0d7531aae6197b3db (patch) | |
| tree | ba3557cf49c9de38b08f612d83c58f21f25ca1fd /gopherschwift/package.go | |
| parent | 0d57c3967c3f81a36fb9f0d48fb59de5a92d2415 (diff) | |
| download | go-schwift-21ec57dc4fed205fde1890c0d7531aae6197b3db.tar.gz | |
Update gophercloud to 2.0.0
Diffstat (limited to 'gopherschwift/package.go')
| -rw-r--r-- | gopherschwift/package.go | 10 |
1 files changed, 5 insertions, 5 deletions
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 } |
