summaryrefslogtreecommitdiff
path: root/registry/service.go
diff options
context:
space:
mode:
authorBoaz Shuster <ripcurld.github@gmail.com>2017-09-01 17:35:04 +0300
committerBoaz Shuster <ripcurld.github@gmail.com>2017-09-17 18:50:16 +0300
commit5258297dac1e32c8dd1caff528d321ac7eb4a87c (patch)
tree0e9bea01865a9d532e08470fed87c70c68615e52 /registry/service.go
parente23965d620e1655f44d47edd8b5e08c2c384fd03 (diff)
downloaddocker-5258297dac1e32c8dd1caff528d321ac7eb4a87c.tar.gz
Exit if service config is loaded unsuccessfully on startup
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Diffstat (limited to 'registry/service.go')
-rw-r--r--registry/service.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/registry/service.go b/registry/service.go
index d36b11f0e1..a991a8fc39 100644
--- a/registry/service.go
+++ b/registry/service.go
@@ -45,10 +45,10 @@ type DefaultService struct {
// NewService returns a new instance of DefaultService ready to be
// installed into an engine.
-func NewService(options ServiceOptions) *DefaultService {
- return &DefaultService{
- config: newServiceConfig(options),
- }
+func NewService(options ServiceOptions) (*DefaultService, error) {
+ config, err := newServiceConfig(options)
+
+ return &DefaultService{config: config}, err
}
// ServiceConfig returns the public registry service configuration.