Skip to content

Commit 63867d5

Browse files
authored
Use warnf instead of errorf in try-catch example
1 parent dee3e5f commit 63867d5

File tree

1 file changed

+1
-1
lines changed
  • content/en/functions/go-template

1 file changed

+1
-1
lines changed

content/en/functions/go-template/try.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Instead of failing the build, we can catch the error and emit a warning:
100100
{{ else with .Value }}
101101
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
102102
{{ else }}
103-
{{ errorf "Unable to get remote resource %q" $url }}
103+
{{ warnf "Unable to get remote resource %q" $url }}
104104
{{ end }}
105105
{{ end }}
106106
```

0 commit comments

Comments
 (0)