Browse code

unexport error errPruneRunning

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2017/05/17 00:37:30
Showing 1 changed files
... ...
@@ -22,9 +22,9 @@ import (
22 22
 )
23 23
 
24 24
 var (
25
-	// ErrPruneRunning is returned when a prune request is received while
25
+	// errPruneRunning is returned when a prune request is received while
26 26
 	// one is in progress
27
-	ErrPruneRunning = fmt.Errorf("a prune operation is already running")
27
+	errPruneRunning = fmt.Errorf("a prune operation is already running")
28 28
 
29 29
 	containersAcceptedFilters = map[string]bool{
30 30
 		"label":  true,
... ...
@@ -51,7 +51,7 @@ var (
51 51
 // ContainersPrune removes unused containers
52 52
 func (daemon *Daemon) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (*types.ContainersPruneReport, error) {
53 53
 	if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) {
54
-		return nil, ErrPruneRunning
54
+		return nil, errPruneRunning
55 55
 	}
56 56
 	defer atomic.StoreInt32(&daemon.pruneRunning, 0)
57 57
 
... ...
@@ -104,7 +104,7 @@ func (daemon *Daemon) ContainersPrune(ctx context.Context, pruneFilters filters.
104 104
 // VolumesPrune removes unused local volumes
105 105
 func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error) {
106 106
 	if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) {
107
-		return nil, ErrPruneRunning
107
+		return nil, errPruneRunning
108 108
 	}
109 109
 	defer atomic.StoreInt32(&daemon.pruneRunning, 0)
110 110
 
... ...
@@ -158,7 +158,7 @@ func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Arg
158 158
 // ImagesPrune removes unused images
159 159
 func (daemon *Daemon) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (*types.ImagesPruneReport, error) {
160 160
 	if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) {
161
-		return nil, ErrPruneRunning
161
+		return nil, errPruneRunning
162 162
 	}
163 163
 	defer atomic.StoreInt32(&daemon.pruneRunning, 0)
164 164
 
... ...
@@ -392,7 +392,7 @@ func (daemon *Daemon) clusterNetworksPrune(ctx context.Context, pruneFilters fil
392 392
 // NetworksPrune removes unused networks
393 393
 func (daemon *Daemon) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (*types.NetworksPruneReport, error) {
394 394
 	if !atomic.CompareAndSwapInt32(&daemon.pruneRunning, 0, 1) {
395
-		return nil, ErrPruneRunning
395
+		return nil, errPruneRunning
396 396
 	}
397 397
 	defer atomic.StoreInt32(&daemon.pruneRunning, 0)
398 398