cleanenv icon indicating copy to clipboard operation
cleanenv copied to clipboard

Error after reading time.Duration fields in 1.2.6

Open olya-varentsova opened this issue 3 years ago • 1 comments

Hello, I used v1.2.5 and alway gone all right. But problems with time fields have appeared in 1.2.6. I have this error pattern: line N: cannot unmarshal !!int `M` into time.Duration. I have config same as:

type Config {
...
Timeout time.Duration `yaml:"timeout"`
...
} 

olya-varentsova avatar Jan 27 '22 16:01 olya-varentsova

Don't use integer like 5 in your configuration file use 5s instead. Note: Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

luthfimasruri avatar May 26 '22 03:05 luthfimasruri