diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-11-25 12:49:04 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-11-25 18:59:06 +0100 |
commit | d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39 (patch) | |
tree | f5715b86cff28eb5c7ab7320c30a492806441cae /lazy | |
parent | 031f948f87ac97ca49d0a487a392a8a0c6afb699 (diff) | |
download | hugo-d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39.tar.gz hugo-d6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39.zip |
resources/images: Make the image cache more robust
Also allow timeout to be set as a duration string, e.g. `30s`.
Fixes #6501
Diffstat (limited to 'lazy')
-rw-r--r-- | lazy/init.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lazy/init.go b/lazy/init.go index a54fda96a..2fef027cf 100644 --- a/lazy/init.go +++ b/lazy/init.go @@ -64,7 +64,7 @@ func (ini *Init) Branch(initFn func() (interface{}, error)) *Init { } // BranchdWithTimeout is same as Branch, but with a timeout. -func (ini *Init) BranchdWithTimeout(timeout time.Duration, f func(ctx context.Context) (interface{}, error)) *Init { +func (ini *Init) BranchWithTimeout(timeout time.Duration, f func(ctx context.Context) (interface{}, error)) *Init { return ini.Branch(func() (interface{}, error) { return ini.withTimeout(timeout, f) }) |