summaryrefslogtreecommitdiff
path: root/service/reload/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-02-27 16:39:35 +0300
committerValery Piashchynski <[email protected]>2020-02-27 16:39:35 +0300
commit9960aff462c985f89e1e9387e0b87bab24504d0e (patch)
treea255061c29da6a0a0e7822476373fc9fe203543b /service/reload/config.go
parent40acc6a22c8e1a7418d4668c312e1b9f90aae6fe (diff)
Update reload tests
Diffstat (limited to 'service/reload/config.go')
-rw-r--r--service/reload/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/reload/config.go b/service/reload/config.go
index f33b5081..efc71972 100644
--- a/service/reload/config.go
+++ b/service/reload/config.go
@@ -62,5 +62,11 @@ func (c *Config) Valid() error {
return errors.New("too short interval")
}
+ if c.Services == nil {
+ return errors.New("should add at least 1 service")
+ } else if len(c.Services) == 0 {
+ return errors.New("service initialized, however, no config added")
+ }
+
return nil
}