diff options
author | Morgan Bauer <mbauer@us.ibm.com> | 2015-07-30 14:01:53 -0700 |
---|---|---|
committer | Morgan Bauer <mbauer@us.ibm.com> | 2015-08-27 22:07:42 -0700 |
commit | abd72d4008dde7ee8249170d49eb4bc963c51e24 (patch) | |
tree | 0142ad7db4031fc6aa98d4713273a0779d736c81 /daemon/archive.go | |
parent | 04b0fb631441b9dda4e9cb1a38b255bac65aa4e7 (diff) | |
download | docker-abd72d4008dde7ee8249170d49eb4bc963c51e24.tar.gz |
golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the
downcased versions already existed, and the existing functions simply
had locks around the already downcased version.
- deleting unused functions
- package comment
- magic numbers replaced by golang constants
- comments all over
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Diffstat (limited to 'daemon/archive.go')
-rw-r--r-- | daemon/archive.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/daemon/archive.go b/daemon/archive.go index dc7c8b05b8..ecfa7753c1 100644 --- a/daemon/archive.go +++ b/daemon/archive.go @@ -29,7 +29,7 @@ func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, err res = res[1:] } - return container.Copy(res) + return container.copy(res) } // ContainerStatPath stats the filesystem resource at the specified path in the @@ -142,7 +142,7 @@ func (container *Container) StatPath(path string) (stat *types.ContainerPathStat defer container.Unmount() err = container.mountVolumes() - defer container.UnmountVolumes(true) + defer container.unmountVolumes(true) if err != nil { return nil, err } @@ -177,7 +177,7 @@ func (container *Container) ArchivePath(path string) (content io.ReadCloser, sta defer func() { if err != nil { // unmount any volumes - container.UnmountVolumes(true) + container.unmountVolumes(true) // unmount the container's rootfs container.Unmount() } @@ -212,13 +212,13 @@ func (container *Container) ArchivePath(path string) (content io.ReadCloser, sta content = ioutils.NewReadCloserWrapper(data, func() error { err := data.Close() - container.UnmountVolumes(true) + container.unmountVolumes(true) container.Unmount() container.Unlock() return err }) - container.LogEvent("archive-path") + container.logEvent("archive-path") return content, stat, nil } @@ -239,7 +239,7 @@ func (container *Container) ExtractToDir(path string, noOverwriteDirNonDir bool, defer container.Unmount() err = container.mountVolumes() - defer container.UnmountVolumes(true) + defer container.unmountVolumes(true) if err != nil { return err } @@ -288,7 +288,7 @@ func (container *Container) ExtractToDir(path string, noOverwriteDirNonDir bool, } if !toVolume && container.hostConfig.ReadonlyRootfs { - return ErrContainerRootfsReadonly + return ErrRootFSReadOnly } options := &archive.TarOptions{ @@ -302,7 +302,7 @@ func (container *Container) ExtractToDir(path string, noOverwriteDirNonDir bool, return err } - container.LogEvent("extract-to-dir") + container.logEvent("extract-to-dir") return nil } |