comparison 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
comparison
equal deleted inserted replaced
5600:9967a78e43f4 5601:1222b777f51f
36 field, fname string, 36 field, fname string,
37 maxSize int64) (string, error) { 37 maxSize int64) (string, error) {
38 return StoreUploadedFileCheck(req, field, fname, maxSize, false) 38 return StoreUploadedFileCheck(req, field, fname, maxSize, false)
39 } 39 }
40 40
41 func StoreUploadedFileCheck(req *http.Request, field, fname string, maxSize int64, errorOverMax bool) (string, error) { 41 // StoreUploadedFileCheck does the same as StoreUploadedFile
42 // with the optional check if the upload is too large or not.
43 func StoreUploadedFileCheck(
44 req *http.Request,
45 field, fname string,
46 maxSize int64,
47 errorOverMax bool,
48 ) (string, error) {
42 49
43 // Check for direct upload. 50 // Check for direct upload.
44 f, _, err := req.FormFile(field) 51 f, _, err := req.FormFile(field)
45 if err != nil { 52 if err != nil {
46 return "", err 53 return "", err