diff --git a/api/server/container.go b/api/server/container.go index 984e90cd600285dc430bc96485008e5a5caf9c42..f74ae89356612c94b76af5e01680bb93ea6d70f8 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 21f2bd91fa484c5ea4f1dcc8cd76b4f679d18503..b47bc580edb0a64c5abce0005c3f966fb67d0a8d 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 f2db48dec9f41a896f049f0ab45595fa2dc886a7..197f80582aed567bfc8cd27ec8f08aab30d54d47 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 0990e98684d04ac087788ece111071bb106ab3e5..023b4327a6d6208e05799b3308e1f3dad6aa8019 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 0b7aff7bc71d599ec0ab0275691cff30435399fb..aa950102ac9fedd90ed9fa696582a9b41e880e48 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 de056ccc9e8b74223c692fafb4c66c6f443fb17c..2fa1297fb64618de2300139def292ffdc5fdb5dc 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 c616b81990495e1b434c73cd870bc467b0345369..76b014a34c1de14f238a3315baa5fc59b267d2f9 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 5b70cfadae74de653cce1734b1711fc7ea295ee3..b8db2bc99797d94d92a7c71e3b5636f2860bb244 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 ae0acd96ec44350143e52bb7a9bb3af71a4a7c04..59b76b52ebfa81db60d26ae067d7c8eb5cd9253f 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 f6c123676557c31e2124a1977d5a914151ee3575..6eec10da28f6491c37ad7a7388aa474812cb9086 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 79e205c7041ffbb7f582110019f564bce1bb234e..e15dd2a3e75bf1bf29d60b4e475ee8e65beba5c4 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 69a04d3fab8385bc343122316be4d32bbe25b37f..55a6a5db72024eff8c3cbb3af2ea0851975557c6 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 d5db86af10aad0a85df2e4714c2185f14b6f90f2..9e33315216f9ad50beef2fc92696917811fcd661 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 1790f23e27d62374dd33763b77d78893ed29fb4b..4112fbcbb1cb4336692de254735b10b6327cd3ea 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 6eca86c241a46ea16d8b1b4794b18e02035f7d98..f224b2e2d215f5d7b41f3d30bb5dc33b0c075a4e 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 48b16e951f48219894d7d7fa917a8255ca4e4491..6dd41c511c0ca44f2132084e8936013586a779fe 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 29ce462624a8f635ed369dba1b0a31c719a0bccf..58eafc62cbd20cfd5abb071685334d75aa3da14e 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 5bb9b8d0c10874425ecc1f5c670316c4a3bd2176..0982e982d5c3c64f39fefe97ed44fd8d4d652eaa 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 ae87aa098f5e0bdeadf6eaf08bd08a2a24dbddaf..81fa04cccd69189e72b9d0b9b6c3f505ce35af97 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