Comment

Comment by teddyh

> Don’t design your config file like this:

> request_timeout = 10

> Accept one of these instead:

> request_timeout = 10s

> request_timeout_seconds = 10

What does ”s” imply? Can I write “10m” for 10 minutes, or is that 10 months? Non-standardized syntax is dangerous.

For config files, I use RFC 3339 duration syntax; i.e. “PT5M” for five minutes. It was the most standardized syntax for semi-human readable time periods which I could find.

parent teddyh 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton