From 3c489c0e29486ce1a5900c4ff87f403ebbbb70fa Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 1 Jul 2024 13:15:00 +0200 Subject: fix autofixable lints --- gopherschwift/package.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gopherschwift') diff --git a/gopherschwift/package.go b/gopherschwift/package.go index 769be23..b6e1f20 100644 --- a/gopherschwift/package.go +++ b/gopherschwift/package.go @@ -50,8 +50,8 @@ import ( // 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. + // If set, this User-Agent will be reported in HTTP requests instead of + // schwift.DefaultUserAgent. UserAgent string } @@ -104,7 +104,7 @@ func (g *backend) do(req *http.Request, afterReauth bool) (*http.Response, error return nil, err } - //detect expired token + // detect expired token if resp.StatusCode == http.StatusUnauthorized && !afterReauth { _, err := io.Copy(io.Discard, resp.Body) if err != nil { @@ -119,12 +119,12 @@ func (g *backend) do(req *http.Request, afterReauth bool) (*http.Response, error return nil, err } - //Swift is stupid: Even though we send `Expect: 100-continue`, it doesn't - //help. Swift will right away answer `100 Continue` and ONLY THEN actually - //check the token (at least in our prod setup). + // Swift is stupid: Even though we send `Expect: 100-continue`, it doesn't + // help. Swift will right away answer `100 Continue` and ONLY THEN actually + // check the token (at least in our prod setup). // - //To increase the chance that this does not completely break this request, - //reset the reader if it implements Seek(). + // To increase the chance that this does not completely break this request, + // reset the reader if it implements Seek(). if seekableReqBody, ok := req.Body.(io.Seeker); ok { _, err := seekableReqBody.Seek(0, io.SeekStart) if err != nil { @@ -132,7 +132,7 @@ func (g *backend) do(req *http.Request, afterReauth bool) (*http.Response, error } } - //restart request with new token + // restart request with new token return g.do(req, true) } -- cgit v1.2.3