Mercurial > gemma
diff pkg/misc/http.go @ 5601:1222b777f51f
Made golint finally happy.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 06 Aug 2022 02:09:57 +0200 |
parents | 6237e6165041 |
children | 31973f6f5cca |
line wrap: on
line diff
--- a/pkg/misc/http.go Sat Aug 06 00:46:21 2022 +0200 +++ b/pkg/misc/http.go Sat Aug 06 02:09:57 2022 +0200 @@ -38,7 +38,14 @@ return StoreUploadedFileCheck(req, field, fname, maxSize, false) } -func StoreUploadedFileCheck(req *http.Request, field, fname string, maxSize int64, errorOverMax bool) (string, error) { +// StoreUploadedFileCheck does the same as StoreUploadedFile +// with the optional check if the upload is too large or not. +func StoreUploadedFileCheck( + req *http.Request, + field, fname string, + maxSize int64, + errorOverMax bool, +) (string, error) { // Check for direct upload. f, _, err := req.FormFile(field)