mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-16 12:05:30 +09:00
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
This commit is contained in:
1 parent
25677cdc5b
commit
ff2fd08228
59 files changed
+115
-116
No files matched your search
@@ -35,7 +35,7 @@ func (err ErrFileTypeForbidden) Error() string {
|
||||
var wildcardTypeRe = regexp.MustCompile(`^[a-z]+/\*$`)
|
||||
|
||||
// Verify validates whether a file is allowed to be uploaded.
|
||||
func Verify(buf []byte, fileName string, allowedTypesStr string) error {
|
||||
func Verify(buf []byte, fileName, allowedTypesStr string) error {
|
||||
allowedTypesStr = strings.ReplaceAll(allowedTypesStr, "|", ",") // compat for old config format
|
||||
|
||||
allowedTypes := []string{}
|
||||
|
||||
Reference in new issue
Block a user