summaryrefslogtreecommitdiffhomepage
path: root/lazy
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-11-25 12:49:04 +0100
committerBjørn Erik Pedersen <[email protected]>2019-11-25 18:59:06 +0100
commitd6f7a9e28dfd5abff08b6aaf6fb3493c46bd1e39 (patch)
treef5715b86cff28eb5c7ab7320c30a492806441cae /lazy
parent031f948f87ac97ca49d0a487a392a8a0c6afb699 (diff)
downloadhugo-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.go2
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)
})