From 7dfd69cdc5966ae454e35cd6e976686131bfda8d Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Thu, 9 Apr 2020 00:31:51 +0300 Subject: chore: make the linter happier (#3245) * chore: make the linter happier * chore: remove reference to maligned linter in .golangci.yml --- modules.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules.go') diff --git a/modules.go b/modules.go index bd1f0e9..d8d6fdd 100644 --- a/modules.go +++ b/modules.go @@ -210,7 +210,7 @@ func GetModules(scope string) []ModuleInfo { var mods []ModuleInfo iterateModules: for id, m := range modules { - modParts := strings.Split(string(id), ".") + modParts := strings.Split(id, ".") // match only the next level of nesting if len(modParts) != len(scopeParts)+1 { @@ -241,9 +241,9 @@ func Modules() []string { modulesMu.RLock() defer modulesMu.RUnlock() - var names []string + names := make([]string, 0, len(modules)) for name := range modules { - names = append(names, string(name)) + names = append(names, name) } sort.Strings(names) -- cgit v1.2.3