From c6d5a7984d471b2cf628e37b2fd61cb11f46cd9c Mon Sep 17 00:00:00 2001 From: Guillermo Prandi Date: Tue, 6 Aug 2019 02:56:21 -0300 Subject: [PATCH] Corrected to pass lint gosimple --- modules/setting/indexer.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/setting/indexer.go b/modules/setting/indexer.go index 304eada607..51b822194a 100644 --- a/modules/setting/indexer.go +++ b/modules/setting/indexer.go @@ -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 }