diff options
author | Wolfy-J <[email protected]> | 2018-06-19 22:44:50 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-19 22:44:50 +0300 |
commit | 0e2cbb7b9c3e138a9551ddcab9399769ee68eaa1 (patch) | |
tree | 8f1706fe99a113d4c43702f4dda02dfbbde3c3b0 /service/http/config.go | |
parent | 8b4ae04b8a4db20b96965a39de97857708c58d5b (diff) | |
parent | 6d9559fabb53d9121163ca43c50ee3270bb7d558 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'service/http/config.go')
-rw-r--r-- | service/http/config.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/http/config.go b/service/http/config.go index fb4574b1..19a2e71d 100644 --- a/service/http/config.go +++ b/service/http/config.go @@ -34,6 +34,14 @@ func (cfg *Config) Valid() error { return errors.New("mailformed workers config") } + if cfg.Workers.Pool == nil { + return errors.New("mailformed workers config (pool config is missing)") + } + + if err := cfg.Workers.Pool.Valid(); err != nil { + return err + } + if !strings.Contains(cfg.Address, ":") { return errors.New("mailformed server address") } |