diff options
author | Jacob Gadikian <jacobgadikian@gmail.com> | 2023-08-08 03:40:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 19:40:31 +0000 |
commit | b32f265ecad60404c3818cc9d42e367a8e4eb7d4 (patch) | |
tree | 16d79c3ad7ddf0cc6f7915d1e47bdd6d269bf8d5 /modules/caddyhttp/templates | |
parent | 431adc09805972196314b2b188904942cbe5dfee (diff) |
ci: Use gofumpt to format code (#5707)
Diffstat (limited to 'modules/caddyhttp/templates')
-rw-r--r-- | modules/caddyhttp/templates/tplcontext.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go index 5dc4ae5..89158f4 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) |