diff --git a/api/server/container.go b/api/server/container.go index 984e90cd6..f74ae8935 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 21f2bd91f..b47bc580e 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 f2db48dec..197f80582 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 0990e9868..023b4327a 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 0b7aff7bc..aa950102a 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 de056ccc9..2fa1297fb 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 c616b8199..76b014a34 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 5b70cfada..b8db2bc99 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 ae0acd96e..59b76b52e 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 f6c123676..6eec10da2 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 79e205c70..e15dd2a3e 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 69a04d3fa..55a6a5db7 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 d5db86af1..9e3331521 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 1790f23e2..4112fbcbb 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 6eca86c24..f224b2e2d 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 48b16e951..6dd41c511 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 29ce46262..58eafc62c 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 5bb9b8d0c..0982e982d 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 ae87aa098..81fa04ccc 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