From 2a8f46abfdc9a1ebfa2b23a71c75c630c0fc454d Mon Sep 17 00:00:00 2001 From: allencloud Date: Tue, 16 May 2017 23:37:30 +0800 Subject: [PATCH] unexport error errPruneRunning Signed-off-by: allencloud --- daemon/prune.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/prune.go b/daemon/prune.go index 4fa6d94624..f757aba71e 100644 --- a/daemon/prune.go +++ b/daemon/prune.go @@ -22,9 +22,9 @@ import ( ) var ( - // ErrPruneRunning is returned when a prune request is received while + // errPruneRunning is returned when a prune request is received while // one is in progress - ErrPruneRunning = fmt.Errorf("a prune operation is already running") + errPruneRunning = fmt.Errorf("a prune operation is already running") containersAcceptedFilters = map[string]bool{ "label": true, @@ -51,7 +51,7 @@ var ( // ContainersPrune removes unused containers func (daemon *Daemon) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (*types.ContainersPruneReport, error) { if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) { - return nil, ErrPruneRunning + return nil, errPruneRunning } defer atomic.StoreInt32(&daemon.pruneRunning, 0) @@ -104,7 +104,7 @@ func (daemon *Daemon) ContainersPrune(ctx context.Context, pruneFilters filters. // VolumesPrune removes unused local volumes func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error) { if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) { - return nil, ErrPruneRunning + return nil, errPruneRunning } defer atomic.StoreInt32(&daemon.pruneRunning, 0) @@ -158,7 +158,7 @@ func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Arg // ImagesPrune removes unused images func (daemon *Daemon) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (*types.ImagesPruneReport, error) { if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) { - return nil, ErrPruneRunning + return nil, errPruneRunning } defer atomic.StoreInt32(&daemon.pruneRunning, 0) @@ -392,7 +392,7 @@ func (daemon *Daemon) clusterNetworksPrune(ctx context.Context, pruneFilters fil // NetworksPrune removes unused networks func (daemon *Daemon) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (*types.NetworksPruneReport, error) { if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) { - return nil, ErrPruneRunning + return nil, errPruneRunning } defer atomic.StoreInt32(&daemon.pruneRunning, 0)