aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-04 15:15:54 +0200
committerGitHub <noreply@github.com>2020-09-04 16:15:54 +0300
commitd7456106bfe6223db54a53af60a5efdf65f39456 (patch)
treedb636fc3d46c8080e59ee84d5fae706f6ea19efa
parentf083bd70df1b6e0ee5bb900a466ee22b44945adb (diff)
downloadgitea-d7456106bfe6223db54a53af60a5efdf65f39456.tar.gz
gitea-d7456106bfe6223db54a53af60a5efdf65f39456.zip
fix go1.15 lint error in modules/public/public.go (#12707)
Co-authored-by: Lauris BH <lauris@nix.lv>
-rw-r--r--modules/public/public.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/public/public.go b/modules/public/public.go
index 008fba9b01..2dcc530a73 100644
--- a/modules/public/public.go
+++ b/modules/public/public.go
@@ -159,7 +159,7 @@ func (opts *Options) handle(ctx *macaron.Context, log *log.Logger, opt *Options)
// Add an Expires header to the static content
if opt.ExpiresAfter > 0 {
ctx.Resp.Header().Set("Expires", time.Now().Add(opt.ExpiresAfter).UTC().Format(http.TimeFormat))
- tag := GenerateETag(fmt.Sprintf("%d", fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat))
+ tag := GenerateETag(fmt.Sprint(fi.Size()), fi.Name(), fi.ModTime().UTC().Format(http.TimeFormat))
ctx.Resp.Header().Set("ETag", tag)
if ctx.Req.Header.Get("If-None-Match") == tag {
ctx.Resp.WriteHeader(304)