1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

refactor(server): use time.Duration for timeout values

Instead of converting at the very last moment,
it's simpler and more readable to use time.Duration ASAP.
This commit is contained in:
gudvinr 2025-08-18 23:10:18 +03:00 committed by Frédéric Guillot
parent ed3bf59356
commit 71af68becd
4 changed files with 20 additions and 11 deletions

View file

@ -219,7 +219,7 @@ func (p *parser) parseLines(lines []string) (err error) {
case "HTTP_CLIENT_USER_AGENT":
p.opts.httpClientUserAgent = parseString(value, defaultHTTPClientUserAgent)
case "HTTP_SERVER_TIMEOUT":
p.opts.httpServerTimeout = parseInt(value, defaultHTTPServerTimeout)
p.opts.httpServerTimeout = parseInterval(value, time.Second, defaultHTTPServerTimeout)
case "AUTH_PROXY_HEADER":
p.opts.authProxyHeader = parseString(value, defaultAuthProxyHeader)
case "AUTH_PROXY_USER_CREATION":