aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/templates
diff options
context:
space:
mode:
authorJacob Gadikian <[email protected]>2023-08-08 03:40:31 +0800
committerGitHub <[email protected]>2023-08-07 19:40:31 +0000
commitb32f265ecad60404c3818cc9d42e367a8e4eb7d4 (patch)
tree16d79c3ad7ddf0cc6f7915d1e47bdd6d269bf8d5 /modules/caddyhttp/templates
parent431adc09805972196314b2b188904942cbe5dfee (diff)
downloadcaddy-b32f265ecad60404c3818cc9d42e367a8e4eb7d4.tar.gz
caddy-b32f265ecad60404c3818cc9d42e367a8e4eb7d4.zip
ci: Use gofumpt to format code (#5707)
Diffstat (limited to 'modules/caddyhttp/templates')
-rw-r--r--modules/caddyhttp/templates/tplcontext.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go
index 5dc4ae553..89158f492 100644
--- a/modules/caddyhttp/templates/tplcontext.go
+++ b/modules/caddyhttp/templates/tplcontext.go
@@ -103,13 +103,11 @@ func (c TemplateContext) OriginalReq() http.Request {
// trusted files. If it is not trusted, be sure to use escaping functions
// in your template.
func (c TemplateContext) funcInclude(filename string, args ...any) (string, error) {
-
bodyBuf := bufPool.Get().(*bytes.Buffer)
bodyBuf.Reset()
defer bufPool.Put(bodyBuf)
err := c.readFileToBuffer(filename, bodyBuf)
-
if err != nil {
return "", err
}
@@ -215,7 +213,6 @@ func (c TemplateContext) funcHTTPInclude(uri string) (string, error) {
// {{ template }} from the standard template library. If the imported file has
// no {{ define }} blocks, the name of the import will be the path
func (c *TemplateContext) funcImport(filename string) (string, error) {
-
bodyBuf := bufPool.Get().(*bytes.Buffer)
bodyBuf.Reset()
defer bufPool.Put(bodyBuf)