hugolib: Fix recently broken timeout config

This commit is contained in:
Bjørn Erik Pedersen 2019-11-25 20:13:29 +01:00
parent 5c5231e09e
commit e3451371bd
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -414,7 +414,7 @@ func newSite(cfg deps.DepsCfg) (*Site, error) {
timeout := 30 * time.Second
if cfg.Language.IsSet("timeout") {
switch v := cfg.Language.Get("timeout").(type) {
case int:
case int64:
timeout = time.Duration(v) * time.Millisecond
case string:
d, err := time.ParseDuration(v)