mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
Fix bug unmarshaling custom duration values
This commit is contained in:
parent
bf54615efc
commit
2265db9028
1 changed files with 1 additions and 2 deletions
3
caddy.go
3
caddy.go
|
@ -157,8 +157,7 @@ func (d *Duration) UnmarshalJSON(b []byte) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
cd := Duration(dd)
|
*d = Duration(dd)
|
||||||
d = &cd
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue