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:
parent
ed3bf59356
commit
71af68becd
4 changed files with 20 additions and 11 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue