Skip to content

Commit

Permalink
Zero value for delay if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
alandotcom committed Jun 21, 2019
1 parent 3e3ebdc commit a5c0713
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ func (c *Config) UnmarshalYAML(data []byte) error {
return err
}

delay, err := time.ParseDuration(aux.CreationDelay)
if err != nil {
return err
if aux.CreationDelay != "" {
delay, err := time.ParseDuration(aux.CreationDelay)
if err != nil {
return err
}
c.CreationDelay = delay
} else {
c.CreationDelay = 0
}
c.CreationDelay = delay

return nil
}

Expand Down

0 comments on commit a5c0713

Please sign in to comment.