1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/router/swarm
Brian Goff 87a12421a9 Add helpers to create errdef errors
Instead of having to create a bunch of custom error types that are doing
nothing but wrapping another error in sub-packages, use a common helper
to create errors of the requested type.

e.g. instead of re-implementing this over and over:

```go
type notFoundError struct {
  cause error
}

func(e notFoundError) Error() string {
  return e.cause.Error()
}

func(e notFoundError) NotFound() {}

func(e notFoundError) Cause() error {
  return e.cause
}
```

Packages can instead just do:

```
  errdefs.NotFound(err)
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-01-11 21:21:43 -05:00
..
backend.go Disabling digest pinning for API versions < 1.30 2017-05-15 16:42:43 -07:00
cluster.go Add config APIs 2017-05-11 10:08:21 -07:00
cluster_routes.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
helpers.go Add interfacer linter 2017-08-24 15:08:26 -04:00