diff options
| author | Stefan Majewsky <stefan.majewsky@sap.com> | 2022-10-28 16:06:40 +0200 |
|---|---|---|
| committer | Stefan Majewsky <stefan.majewsky@sap.com> | 2022-10-28 16:06:40 +0200 |
| commit | 90dd519a948d06738479c04d331f28dfab99315c (patch) | |
| tree | d4a9914cb73be3dbe9438b012a08408d79bdb7c9 /gopherschwift | |
| parent | fd6e57b6239655722884a49a86be0f051cc32bde (diff) | |
| parent | 5cf9b60d2ded95d29827389a1a5901f1068d4337 (diff) | |
| download | go-schwift-90dd519a948d06738479c04d331f28dfab99315c.tar.gz | |
Merge remote-tracking branch 'SuperSandro2000:sha2'
Diffstat (limited to 'gopherschwift')
| -rw-r--r-- | gopherschwift/package.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gopherschwift/package.go b/gopherschwift/package.go index 1d0d724..3c89074 100644 --- a/gopherschwift/package.go +++ b/gopherschwift/package.go @@ -17,7 +17,6 @@ ******************************************************************************/ /* - Package gopherschwift contains a Gophercloud backend for Schwift. If your application uses Gophercloud (https://github.com/gophercloud/gophercloud), @@ -37,29 +36,28 @@ so you only need to obtain a client token once using Gophercloud. For example: Using this schwift.Account instance, you have access to all of schwift's API. Refer to the documentation in the parent package for details. - */ package gopherschwift import ( "io" - "io/ioutil" "net/http" "github.com/gophercloud/gophercloud" + "github.com/majewsky/schwift" ) -//Options contains additional options that can be passed to Wrap(). +// Options contains additional options that can be passed to Wrap(). type Options struct { //If set, this User-Agent will be reported in HTTP requests instead of //schwift.DefaultUserAgent. UserAgent string } -//Wrap creates a schwift.Account that uses the given service client as its -//backend. The service client must refer to a Swift endpoint, i.e. it should -//have been created by openstack.NewObjectStorageV1(). +// Wrap creates a schwift.Account that uses the given service client as its +// backend. The service client must refer to a Swift endpoint, i.e. it should +// have been created by openstack.NewObjectStorageV1(). func Wrap(client *gophercloud.ServiceClient, opts *Options) (*schwift.Account, error) { b := &backend{ c: client, @@ -108,7 +106,7 @@ func (g *backend) do(req *http.Request, afterReauth bool) (*http.Response, error //detect expired token if resp.StatusCode == http.StatusUnauthorized && !afterReauth { - _, err := io.Copy(ioutil.Discard, resp.Body) + _, err := io.Copy(io.Discard, resp.Body) if err != nil { return nil, err } |
