1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
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 Add goimports to linters. 2017-08-21 18:15:08 -04:00
auth.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
auth_test.go Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
config.go Merge pull request #34495 from ripcurld0/registry_mirror_json 2017-09-18 21:59:14 -07:00
config_test.go Add ValidateIndexName testcase 2017-10-19 08:53:26 +08:00
config_unix.go Remove command line flag install from registry package. 2017-08-29 15:55:09 -04:00
config_windows.go Remove command line flag install from registry package. 2017-08-29 15:55:09 -04:00
endpoint_test.go Login update and endpoint refactor 2016-03-01 11:52:32 -08:00
endpoint_v1.go Remove Docker from some functions 2017-10-25 14:39:51 +02:00
errors.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
registry.go Remove Docker from some functions 2017-10-25 14:39:51 +02:00
registry_mock_test.go Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
registry_test.go Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
service.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
service_v1.go Disable v1 protocol for the default registry 2016-11-11 00:23:25 -08:00
service_v1_test.go Exit if service config is loaded unsuccessfully on startup 2017-09-17 18:50:16 +03:00
service_v2.go Add daemon option to push foreign layers 2017-05-16 14:36:36 -07:00
session.go Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
types.go Use distribution reference 2017-02-07 11:08:37 -08:00