Skip to content

Commit c6d5a79

Browse files
author
Guillermo Prandi
committed
Corrected to pass lint gosimple
1 parent c48c37a commit c6d5a79

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/setting/indexer.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ func extensionsFromString(from string) map[string]bool {
7676
if ext == "." {
7777
extmap[""] = true
7878
} else {
79-
if strings.HasPrefix(ext, ".") {
80-
ext = ext[1:]
81-
}
79+
ext = strings.TrimPrefix(ext, ".")
8280
if ext != "" {
8381
extmap[ext] = true
8482
}

0 commit comments

Comments
 (0)