Преглед на файлове

Move api/errors/ to errors/

Per @calavera's suggestion: https://github.com/docker/docker/pull/16355#issuecomment-141139220

Signed-off-by: Doug Davis <dug@us.ibm.com>
Doug Davis преди 9 години
родител
ревизия
a283a30fb0

+ 1 - 1
api/server/container.go

@@ -13,10 +13,10 @@ import (
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/distribution/registry/api/errcode"
 	"github.com/docker/distribution/registry/api/errcode"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/context"
 	"github.com/docker/docker/context"
 	"github.com/docker/docker/daemon"
 	"github.com/docker/docker/daemon"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/ioutils"
 	"github.com/docker/docker/pkg/ioutils"
 	"github.com/docker/docker/pkg/signal"
 	"github.com/docker/docker/pkg/signal"
 	"github.com/docker/docker/pkg/version"
 	"github.com/docker/docker/pkg/version"

+ 1 - 1
api/server/server.go

@@ -218,7 +218,7 @@ func httpError(w http.ResponseWriter, err error) {
 	case errcode.Error:
 	case errcode.Error:
 		// For reference, if you're looking for a particular error
 		// For reference, if you're looking for a particular error
 		// then you can do something like :
 		// then you can do something like :
-		//   import ( derr "github.com/docker/docker/api/errors" )
+		//   import ( derr "github.com/docker/docker/errors" )
 		//   if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
 		//   if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
 
 
 		daError, _ := err.(errcode.Error)
 		daError, _ := err.(errcode.Error)

+ 1 - 1
builder/dispatchers.go

@@ -18,7 +18,7 @@ import (
 	"strings"
 	"strings"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
+	derr "github.com/docker/docker/errors"
 	flag "github.com/docker/docker/pkg/mflag"
 	flag "github.com/docker/docker/pkg/mflag"
 	"github.com/docker/docker/pkg/nat"
 	"github.com/docker/docker/pkg/nat"
 	"github.com/docker/docker/pkg/signal"
 	"github.com/docker/docker/pkg/signal"

+ 1 - 1
daemon/container.go

@@ -15,11 +15,11 @@ import (
 	"github.com/opencontainers/runc/libcontainer/label"
 	"github.com/opencontainers/runc/libcontainer/label"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/logger"
 	"github.com/docker/docker/daemon/logger"
 	"github.com/docker/docker/daemon/logger/jsonfilelog"
 	"github.com/docker/docker/daemon/logger/jsonfilelog"
 	"github.com/docker/docker/daemon/network"
 	"github.com/docker/docker/daemon/network"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/pkg/archive"
 	"github.com/docker/docker/pkg/archive"
 	"github.com/docker/docker/pkg/broadcastwriter"
 	"github.com/docker/docker/pkg/broadcastwriter"

+ 1 - 1
daemon/container_unix.go

@@ -15,10 +15,10 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/links"
 	"github.com/docker/docker/daemon/links"
 	"github.com/docker/docker/daemon/network"
 	"github.com/docker/docker/daemon/network"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/directory"
 	"github.com/docker/docker/pkg/directory"
 	"github.com/docker/docker/pkg/nat"
 	"github.com/docker/docker/pkg/nat"
 	"github.com/docker/docker/pkg/stringid"
 	"github.com/docker/docker/pkg/stringid"

+ 1 - 1
daemon/container_windows.go

@@ -5,8 +5,8 @@ package daemon
 import (
 import (
 	"strings"
 	"strings"
 
 
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	derr "github.com/docker/docker/errors"
 )
 )
 
 
 // DefaultPathEnv is deliberately empty on Windows as the default path will be set by
 // DefaultPathEnv is deliberately empty on Windows as the default path will be set by

+ 1 - 1
daemon/create.go

@@ -4,8 +4,8 @@ import (
 	"strings"
 	"strings"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/graph/tags"
 	"github.com/docker/docker/graph/tags"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/pkg/parsers"
 	"github.com/docker/docker/pkg/parsers"

+ 1 - 1
daemon/create_unix.go

@@ -7,7 +7,7 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"strings"
 	"strings"
 
 
-	derr "github.com/docker/docker/api/errors"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/image"
 	"github.com/docker/docker/pkg/stringid"
 	"github.com/docker/docker/pkg/stringid"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"

+ 1 - 1
daemon/daemon.go

@@ -20,11 +20,11 @@ import (
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/docker/api"
 	"github.com/docker/docker/api"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/events"
 	"github.com/docker/docker/daemon/events"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver/execdrivers"
 	"github.com/docker/docker/daemon/execdriver/execdrivers"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
+	derr "github.com/docker/docker/errors"
 	// register vfs
 	// register vfs
 	_ "github.com/docker/docker/daemon/graphdriver/vfs"
 	_ "github.com/docker/docker/daemon/graphdriver/vfs"
 	"github.com/docker/docker/daemon/logger"
 	"github.com/docker/docker/daemon/logger"

+ 1 - 1
daemon/start.go

@@ -3,7 +3,7 @@ package daemon
 import (
 import (
 	"runtime"
 	"runtime"
 
 
-	derr "github.com/docker/docker/api/errors"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/utils"
 	"github.com/docker/docker/utils"
 )
 )

+ 1 - 1
daemon/state.go

@@ -5,8 +5,8 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/units"
 	"github.com/docker/docker/pkg/units"
 )
 )
 
 

+ 1 - 1
daemon/stats_collector_unix.go

@@ -11,8 +11,8 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/pubsub"
 	"github.com/docker/docker/pkg/pubsub"
 	"github.com/opencontainers/runc/libcontainer/system"
 	"github.com/opencontainers/runc/libcontainer/system"
 )
 )

+ 1 - 1
daemon/stop.go

@@ -1,7 +1,7 @@
 package daemon
 package daemon
 
 
 import (
 import (
-	derr "github.com/docker/docker/api/errors"
+	derr "github.com/docker/docker/errors"
 )
 )
 
 
 // ContainerStop looks for the given container and terminates it,
 // ContainerStop looks for the given container and terminates it,

+ 1 - 1
daemon/top_unix.go

@@ -7,8 +7,8 @@ import (
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 
 
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types"
+	derr "github.com/docker/docker/errors"
 )
 )
 
 
 // ContainerTop lists the processes running inside of the given
 // ContainerTop lists the processes running inside of the given

+ 1 - 1
daemon/top_windows.go

@@ -1,8 +1,8 @@
 package daemon
 package daemon
 
 
 import (
 import (
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types"
+	derr "github.com/docker/docker/errors"
 )
 )
 
 
 // ContainerTop is not supported on Windows and returns an error.
 // ContainerTop is not supported on Windows and returns an error.

+ 1 - 1
daemon/unpause.go

@@ -1,7 +1,7 @@
 package daemon
 package daemon
 
 
 import (
 import (
-	derr "github.com/docker/docker/api/errors"
+	derr "github.com/docker/docker/errors"
 )
 )
 
 
 // ContainerUnpause unpauses a container
 // ContainerUnpause unpauses a container

+ 1 - 1
daemon/volumes.go

@@ -10,8 +10,8 @@ import (
 	"sync"
 	"sync"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/api/types"
 	"github.com/docker/docker/api/types"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/chrootarchive"
 	"github.com/docker/docker/pkg/chrootarchive"
 	"github.com/docker/docker/pkg/system"
 	"github.com/docker/docker/pkg/system"
 	"github.com/docker/docker/volume"
 	"github.com/docker/docker/volume"

+ 1 - 1
daemon/volumes_unix.go

@@ -10,8 +10,8 @@ import (
 	"strings"
 	"strings"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
-	derr "github.com/docker/docker/api/errors"
 	"github.com/docker/docker/daemon/execdriver"
 	"github.com/docker/docker/daemon/execdriver"
+	derr "github.com/docker/docker/errors"
 	"github.com/docker/docker/pkg/system"
 	"github.com/docker/docker/pkg/system"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/volume"
 	"github.com/docker/docker/volume"

+ 2 - 2
api/errors/README.md → errors/README.md

@@ -10,7 +10,7 @@ file. The errors for each package are defined here instead of within
 their respective package structure so that Docker CLI code that may need
 their respective package structure so that Docker CLI code that may need
 to import these error definition files will not need to know or understand
 to import these error definition files will not need to know or understand
 the engine's package/directory structure. In other words, all they should
 the engine's package/directory structure. In other words, all they should
-need to do is import `.../docker/api/errors` and they will automatically
+need to do is import `.../docker/errors` and they will automatically
 pick up all Docker engine defined errors.  This also gives the engine
 pick up all Docker engine defined errors.  This also gives the engine
 developers the freedom to change the engine packaging structure (e.g. to
 developers the freedom to change the engine packaging structure (e.g. to
 CRUD packages) without worrying about breaking existing clients.
 CRUD packages) without worrying about breaking existing clients.
@@ -47,7 +47,7 @@ When processing an errcode error, if you are looking for a particular
 error then you can do something like:
 error then you can do something like:
 
 
 ```
 ```
-import derr "github.com/docker/docker/api/errors"
+import derr "github.com/docker/docker/errors"
 
 
 ...
 ...
 
 

+ 0 - 0
api/errors/builder.go → errors/builder.go


+ 0 - 0
api/errors/daemon.go → errors/daemon.go


+ 0 - 0
api/errors/error.go → errors/error.go