aboutsummaryrefslogtreecommitdiff
path: root/gopherschwift/package.go
diff options
context:
space:
mode:
Diffstat (limited to 'gopherschwift/package.go')
-rw-r--r--gopherschwift/package.go18
1 files changed, 9 insertions, 9 deletions
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)
}