mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 20:17:21 +00:00
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
This commit is contained in:
@ -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