diff --git a/api/server/container.go b/api/server/container.go index 984e90cd60..f74ae89356 100644 --- a/api/server/container.go +++ b/api/server/container.go @@ -13,10 +13,10 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/distribution/registry/api/errcode" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/api/types" "github.com/docker/docker/context" "github.com/docker/docker/daemon" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/signal" "github.com/docker/docker/pkg/version" diff --git a/api/server/server.go b/api/server/server.go index 21f2bd91fa..b47bc580ed 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -218,7 +218,7 @@ func httpError(w http.ResponseWriter, err error) { case errcode.Error: // For reference, if you're looking for a particular error // 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 { ... } daError, _ := err.(errcode.Error) diff --git a/builder/dispatchers.go b/builder/dispatchers.go index f2db48dec9..197f80582a 100644 --- a/builder/dispatchers.go +++ b/builder/dispatchers.go @@ -18,7 +18,7 @@ import ( "strings" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" + derr "github.com/docker/docker/errors" flag "github.com/docker/docker/pkg/mflag" "github.com/docker/docker/pkg/nat" "github.com/docker/docker/pkg/signal" diff --git a/daemon/container.go b/daemon/container.go index 0990e98684..023b4327a6 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -15,11 +15,11 @@ import ( "github.com/opencontainers/runc/libcontainer/label" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger/jsonfilelog" "github.com/docker/docker/daemon/network" + derr "github.com/docker/docker/errors" "github.com/docker/docker/image" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/broadcastwriter" diff --git a/daemon/container_unix.go b/daemon/container_unix.go index 0b7aff7bc7..aa950102ac 100644 --- a/daemon/container_unix.go +++ b/daemon/container_unix.go @@ -15,10 +15,10 @@ import ( "time" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/links" "github.com/docker/docker/daemon/network" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/directory" "github.com/docker/docker/pkg/nat" "github.com/docker/docker/pkg/stringid" diff --git a/daemon/container_windows.go b/daemon/container_windows.go index de056ccc9e..2fa1297fb6 100644 --- a/daemon/container_windows.go +++ b/daemon/container_windows.go @@ -5,8 +5,8 @@ package daemon import ( "strings" - derr "github.com/docker/docker/api/errors" "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 diff --git a/daemon/create.go b/daemon/create.go index c616b81990..76b014a34c 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/api/types" + derr "github.com/docker/docker/errors" "github.com/docker/docker/graph/tags" "github.com/docker/docker/image" "github.com/docker/docker/pkg/parsers" diff --git a/daemon/create_unix.go b/daemon/create_unix.go index 5b70cfadae..b8db2bc997 100644 --- a/daemon/create_unix.go +++ b/daemon/create_unix.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - derr "github.com/docker/docker/api/errors" + derr "github.com/docker/docker/errors" "github.com/docker/docker/image" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/runconfig" diff --git a/daemon/daemon.go b/daemon/daemon.go index ae0acd96ec..59b76b52eb 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -20,11 +20,11 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/api" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/events" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/execdriver/execdrivers" "github.com/docker/docker/daemon/graphdriver" + derr "github.com/docker/docker/errors" // register vfs _ "github.com/docker/docker/daemon/graphdriver/vfs" "github.com/docker/docker/daemon/logger" diff --git a/daemon/start.go b/daemon/start.go index f6c1236765..6eec10da28 100644 --- a/daemon/start.go +++ b/daemon/start.go @@ -3,7 +3,7 @@ package daemon import ( "runtime" - derr "github.com/docker/docker/api/errors" + derr "github.com/docker/docker/errors" "github.com/docker/docker/runconfig" "github.com/docker/docker/utils" ) diff --git a/daemon/state.go b/daemon/state.go index 79e205c704..e15dd2a3e7 100644 --- a/daemon/state.go +++ b/daemon/state.go @@ -5,8 +5,8 @@ import ( "sync" "time" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/execdriver" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/units" ) diff --git a/daemon/stats_collector_unix.go b/daemon/stats_collector_unix.go index 69a04d3fab..55a6a5db72 100644 --- a/daemon/stats_collector_unix.go +++ b/daemon/stats_collector_unix.go @@ -11,8 +11,8 @@ import ( "time" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/execdriver" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/pubsub" "github.com/opencontainers/runc/libcontainer/system" ) diff --git a/daemon/stop.go b/daemon/stop.go index d5db86af10..9e33315216 100644 --- a/daemon/stop.go +++ b/daemon/stop.go @@ -1,7 +1,7 @@ package daemon import ( - derr "github.com/docker/docker/api/errors" + derr "github.com/docker/docker/errors" ) // ContainerStop looks for the given container and terminates it, diff --git a/daemon/top_unix.go b/daemon/top_unix.go index 1790f23e27..4112fbcbb1 100644 --- a/daemon/top_unix.go +++ b/daemon/top_unix.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/api/types" + derr "github.com/docker/docker/errors" ) // ContainerTop lists the processes running inside of the given diff --git a/daemon/top_windows.go b/daemon/top_windows.go index 6eca86c241..f224b2e2d2 100644 --- a/daemon/top_windows.go +++ b/daemon/top_windows.go @@ -1,8 +1,8 @@ package daemon import ( - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/api/types" + derr "github.com/docker/docker/errors" ) // ContainerTop is not supported on Windows and returns an error. diff --git a/daemon/unpause.go b/daemon/unpause.go index 48b16e951f..6dd41c511c 100644 --- a/daemon/unpause.go +++ b/daemon/unpause.go @@ -1,7 +1,7 @@ package daemon import ( - derr "github.com/docker/docker/api/errors" + derr "github.com/docker/docker/errors" ) // ContainerUnpause unpauses a container diff --git a/daemon/volumes.go b/daemon/volumes.go index 29ce462624..58eafc62cb 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -10,8 +10,8 @@ import ( "sync" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/api/types" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/docker/pkg/system" "github.com/docker/docker/volume" diff --git a/daemon/volumes_unix.go b/daemon/volumes_unix.go index 5bb9b8d0c1..0982e982d5 100644 --- a/daemon/volumes_unix.go +++ b/daemon/volumes_unix.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/Sirupsen/logrus" - derr "github.com/docker/docker/api/errors" "github.com/docker/docker/daemon/execdriver" + derr "github.com/docker/docker/errors" "github.com/docker/docker/pkg/system" "github.com/docker/docker/runconfig" "github.com/docker/docker/volume" diff --git a/api/errors/README.md b/errors/README.md similarity index 95% rename from api/errors/README.md rename to errors/README.md index ae87aa098f..81fa04cccd 100644 --- a/api/errors/README.md +++ b/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 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 -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 developers the freedom to change the engine packaging structure (e.g. to 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: ``` -import derr "github.com/docker/docker/api/errors" +import derr "github.com/docker/docker/errors" ... diff --git a/api/errors/builder.go b/errors/builder.go similarity index 100% rename from api/errors/builder.go rename to errors/builder.go diff --git a/api/errors/daemon.go b/errors/daemon.go similarity index 100% rename from api/errors/daemon.go rename to errors/daemon.go diff --git a/api/errors/error.go b/errors/error.go similarity index 100% rename from api/errors/error.go rename to errors/error.go