diff options
author | Valery Piashchynski <[email protected]> | 2021-01-21 13:25:36 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-21 13:25:36 +0300 |
commit | 7da6c78449776e1f3c6716250bca0b712a0423a4 (patch) | |
tree | f3512de66aca2bba408485a0ea2fc936c0e4fb9b /plugins/reload/config.go | |
parent | 0ff05b2732b4fd0783f959c94c54d7e39169f979 (diff) |
Uniform all configs
Add debug server
Check nil's for all plugin intialization
Diffstat (limited to 'plugins/reload/config.go')
-rw-r--r-- | plugins/reload/config.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/reload/config.go b/plugins/reload/config.go index 9bce6b25..6fd3af70 100644 --- a/plugins/reload/config.go +++ b/plugins/reload/config.go @@ -36,9 +36,13 @@ type ServiceConfig struct { } // InitDefaults sets missing values to their default values. -func InitDefaults(c *Config) { - c.Interval = time.Second - c.Patterns = []string{".php"} +func (c *Config) InitDefaults() { + if c.Interval == 0 { + c.Interval = time.Second + } + if c.Patterns == nil { + c.Patterns = []string{".php"} + } } // Valid validates the configuration. |