aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/docker/distribution/registry/api/errcode/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/docker/distribution/registry/api/errcode/handler.go')
-rw-r--r--vendor/github.com/docker/distribution/registry/api/errcode/handler.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/handler.go b/vendor/github.com/docker/distribution/registry/api/errcode/handler.go
index 49a64a86e..d77e70473 100644
--- a/vendor/github.com/docker/distribution/registry/api/errcode/handler.go
+++ b/vendor/github.com/docker/distribution/registry/api/errcode/handler.go
@@ -36,9 +36,5 @@ func ServeJSON(w http.ResponseWriter, err error) error {
w.WriteHeader(sc)
- if err := json.NewEncoder(w).Encode(err); err != nil {
- return err
- }
-
- return nil
+ return json.NewEncoder(w).Encode(err)
}