From 04ce17415f25dbf10eba954212c8428ae630df88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 26 Oct 2022 11:31:22 +0200 Subject: Format with go 1.19 --- gopherschwift/package.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gopherschwift/package.go') diff --git a/gopherschwift/package.go b/gopherschwift/package.go index 1d0d724..adeee83 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,7 +36,6 @@ 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 @@ -47,19 +45,20 @@ import ( "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, -- cgit v1.2.3 From 8b38a040830109f19550e7329b82ec5caf76b321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 26 Oct 2022 15:23:04 +0200 Subject: Fix linting errors --- gopherschwift/package.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gopherschwift/package.go') diff --git a/gopherschwift/package.go b/gopherschwift/package.go index adeee83..3c89074 100644 --- a/gopherschwift/package.go +++ b/gopherschwift/package.go @@ -41,7 +41,6 @@ package gopherschwift import ( "io" - "io/ioutil" "net/http" "github.com/gophercloud/gophercloud" @@ -107,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 } -- cgit v1.2.3