diff options
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. |