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>
This commit is contained in:
Doug Davis 2015-09-17 11:54:14 -07:00
parent 828e4ac45a
commit a283a30fb0
22 changed files with 20 additions and 20 deletions

View file

@ -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"

View file

@ -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)

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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,

View file

@ -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

View file

@ -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.

View file

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

View file

@ -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"

View file

@ -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"

View file

@ -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"
...