moby--moby/registry
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
..
resumable
auth.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
auth_test.go
config.go
config_test.go
config_unix.go
config_windows.go
endpoint_test.go
endpoint_v1.go
errors.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
registry.go
registry_mock_test.go
registry_test.go
service.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
service_v1.go
service_v1_test.go
service_v2.go
session.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
types.go