1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/distribution
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
..
fixtures/validate_manifest Add distribution package 2015-11-24 09:40:24 -08:00
metadata add namespace method conver 2018-01-05 16:24:18 +08:00
utils Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
xfer LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
config.go LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
errors.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
errors_test.go fix golint errors 2017-12-04 16:44:03 -08:00
pull.go LCOW: API: Add platform to /images/create and /build 2017-10-06 11:44:18 -07:00
pull_v1.go Remove Docker from some functions 2017-10-25 14:39:51 +02:00
pull_v2.go Disambiguate mirror -> other endpoint fallbacks from V2 -> V1 2017-11-30 20:01:03 -08:00
pull_v2_test.go Move ErrorContains to an internal package. 2017-08-25 12:04:58 -04:00
pull_v2_unix.go LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00
pull_v2_windows.go Remove redundant build-tags 2017-12-18 17:41:53 +01:00
push.go Reworded push message 2017-09-29 17:02:20 +02:00
push_v1.go Remove Docker from some functions 2017-10-25 14:39:51 +02:00
push_v2.go Disambiguate mirror -> other endpoint fallbacks from V2 -> V1 2017-11-30 20:01:03 -08:00
push_v2_test.go Spelling fixes 2017-07-03 13:13:09 -07:00
registry.go Remove Docker from some functions 2017-10-25 14:39:51 +02:00
registry_unit_test.go LCOW: API change JSON header to string POST parameter 2017-10-06 15:26:48 -07:00