Skip to content

Commit

Permalink
log validate
Browse files Browse the repository at this point in the history
  • Loading branch information
DrmagicE committed Dec 15, 2020
1 parent 1d728ee commit 88ac9ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,19 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
return nil
}

func (c Config) Validate() error {
err := c.MQTT.Validate()
func (c Config) Validate() (err error) {
err = c.Log.Validate()
if err != nil {
return err
}
err = c.MQTT.Validate()
if err != nil {
return err
}
err = c.Persistence.Validate()
if err != nil {
return err
}

for _, conf := range c.Plugins {
err := conf.Validate()
if err != nil {
Expand Down

0 comments on commit 88ac9ba

Please sign in to comment.