From 02c11dd4a70cf028160e102d6196b946a090e73f Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Wed, 23 Mar 2016 15:15:38 +0100 Subject: [PATCH] Don't de-reference swift connection The connection object contains a mutex, so it is good practice not to dereference it to a value. Reported by Go tip "go vet". --- swift/swift.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/swift/swift.go b/swift/swift.go index 03016a832..bc07e1250 100644 --- a/swift/swift.go +++ b/swift/swift.go @@ -79,11 +79,11 @@ func init() { // Fs represents a remote swift server type Fs struct { - name string // name of this remote - c swift.Connection // the connection to the swift server - container string // the container we are working on - segmentsContainer string // container to store the segments (if any) in - root string // the path we are working on if any + name string // name of this remote + c *swift.Connection // the connection to the swift server + container string // the container we are working on + segmentsContainer string // container to store the segments (if any) in + root string // the path we are working on if any } // Object describes a swift object @@ -175,7 +175,7 @@ func NewFsWithConnection(name, root string, c *swift.Connection) (fs.Fs, error) } f := &Fs{ name: name, - c: *c, + c: c, container: container, segmentsContainer: container + "_segments", root: directory,