summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/templates.go
diff options
context:
space:
mode:
authorJason Du <xdu@infoblox.com>2021-04-30 19:17:23 -0700
committerGitHub <noreply@github.com>2021-04-30 22:17:23 -0400
commit637fd8f67b7ff6191673ff13e94825a4ec896891 (patch)
treea50995058c76b6449dd6eb41013f75f9495bb969 /modules/caddyhttp/templates/templates.go
parent956f01163d150b70aa3d5fc418ba9f150bd25c24 (diff)
fileserver: Share template logic for both `templates` and `file_server browse` (#4093)
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
Diffstat (limited to 'modules/caddyhttp/templates/templates.go')
-rw-r--r--modules/caddyhttp/templates/templates.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/templates/templates.go b/modules/caddyhttp/templates/templates.go
index f9ce1c3..33e5a70 100644
--- a/modules/caddyhttp/templates/templates.go
+++ b/modules/caddyhttp/templates/templates.go
@@ -37,7 +37,7 @@ func init() {
//
// [All Sprig functions](https://masterminds.github.io/sprig/) are supported.
//
-// In addition to the standard functions and Sprig functions, Caddy adds
+// In addition to the standard functions and the Sprig library, Caddy adds
// extra functions and data that are available to a template:
//
// ##### `.Args`
@@ -303,10 +303,10 @@ func (t *Templates) executeTemplate(rr caddyhttp.ResponseRecorder, r *http.Reque
fs = http.Dir(repl.ReplaceAll(t.FileRoot, "."))
}
- ctx := &templateContext{
+ ctx := &TemplateContext{
Root: fs,
Req: r,
- RespHeader: tplWrappedHeader{rr.Header()},
+ RespHeader: WrappedHeader{rr.Header()},
config: t,
}