mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-06 22:33:14 +00:00
Corrected to pass lint gosimple
This commit is contained in:
parent
c48c37ad09
commit
c6d5a7984d
1 changed files with 1 additions and 3 deletions
|
@ -76,9 +76,7 @@ func extensionsFromString(from string) map[string]bool {
|
|||
if ext == "." {
|
||||
extmap[""] = true
|
||||
} else {
|
||||
if strings.HasPrefix(ext, ".") {
|
||||
ext = ext[1:]
|
||||
}
|
||||
ext = strings.TrimPrefix(ext, ".")
|
||||
if ext != "" {
|
||||
extmap[ext] = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue