Skip to content

Commit

Permalink
Move api/errors/ to errors/
Browse files Browse the repository at this point in the history
Per @calavera's suggestion: moby#16355 (comment)

Signed-off-by: Doug Davis <[email protected]>
  • Loading branch information
Doug Davis committed Sep 17, 2015
1 parent 828e4ac commit a283a30
Show file tree
Hide file tree
Showing 22 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/server/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion api/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion builder/dispatchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/container_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/container_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion daemon/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/create_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion daemon/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion daemon/stats_collector_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion daemon/stop.go
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion daemon/top_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion daemon/top_windows.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion daemon/unpause.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package daemon

import (
derr "github.com/docker/docker/api/errors"
derr "github.com/docker/docker/errors"
)

// ContainerUnpause unpauses a container
Expand Down
2 changes: 1 addition & 1 deletion daemon/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/volumes_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions api/errors/README.md → errors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
...
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a283a30

Please sign in to comment.