1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-28 13:49:13 -05:00

Corrected to pass lint gosimple

This commit is contained in:
Guillermo Prandi 2019-08-06 02:56:21 -03:00
parent c48c37ad09
commit c6d5a7984d

View file

@ -76,9 +76,7 @@ func extensionsFromString(from string) map[string]bool {
if ext == "." { if ext == "." {
extmap[""] = true extmap[""] = true
} else { } else {
if strings.HasPrefix(ext, ".") { ext = strings.TrimPrefix(ext, ".")
ext = ext[1:]
}
if ext != "" { if ext != "" {
extmap[ext] = true extmap[ext] = true
} }