Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While in go-yaml#200 it was correctly stated that durations without units are misleading, there's an exception to that: zero duration. This is a special case in time.Duration.ParseDuration(): https://github.com/golang/go/blob/176b63e7113b82c140a4ecb2620024526c2c42e3/src/time/format.go#L1536-L1539 And supporting this improves backwards compatibility with YAMLs written for v2, as its very common to write just a zero for zero duration (especially because this works for other config-parsing sources like flags). Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
- Loading branch information