diff options
author | 6543 <6543@obermui.de> | 2023-07-07 07:31:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 05:31:56 +0000 |
commit | 8995046110147ae2c8c98be4e0a8c0b643ccc29c (patch) | |
tree | 94a3007199687c0a68eee5889af1619f1eebaf61 /routers/common | |
parent | b1eb1676aa95d776ff9085002641ad62e040cd93 (diff) | |
download | gitea-8995046110147ae2c8c98be4e0a8c0b643ccc29c.tar.gz gitea-8995046110147ae2c8c98be4e0a8c0b643ccc29c.zip |
Less naked returns (#25713)
just a step towards #25655
and some related refactoring
Diffstat (limited to 'routers/common')
-rw-r--r-- | routers/common/serve.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/common/serve.go b/routers/common/serve.go index 3094ee6a6e..8a7f8b3332 100644 --- a/routers/common/serve.go +++ b/routers/common/serve.go @@ -15,7 +15,7 @@ import ( ) // ServeBlob download a git.Blob -func ServeBlob(ctx *context.Base, filePath string, blob *git.Blob, lastModified time.Time) error { +func ServeBlob(ctx *context.Base, filePath string, blob *git.Blob, lastModified *time.Time) error { if httpcache.HandleGenericETagTimeCache(ctx.Req, ctx.Resp, `"`+blob.ID.String()+`"`, lastModified) { return nil } @@ -38,6 +38,6 @@ func ServeContentByReader(ctx *context.Base, filePath string, size int64, reader httplib.ServeContentByReader(ctx.Req, ctx.Resp, filePath, size, reader) } -func ServeContentByReadSeeker(ctx *context.Base, filePath string, modTime time.Time, reader io.ReadSeeker) { +func ServeContentByReadSeeker(ctx *context.Base, filePath string, modTime *time.Time, reader io.ReadSeeker) { httplib.ServeContentByReadSeeker(ctx.Req, ctx.Resp, filePath, modTime, reader) } |