aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules.go
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2020-04-09 00:31:51 +0300
committerGitHub <[email protected]>2020-04-08 15:31:51 -0600
commit7dfd69cdc5966ae454e35cd6e976686131bfda8d (patch)
tree4d58832966c5136d5be3d9b3f63dcb07c30999d1 /modules.go
parent28fdf64dc510472ccd9e6d46eb149d19cd70919a (diff)
downloadcaddy-7dfd69cdc5966ae454e35cd6e976686131bfda8d.tar.gz
caddy-7dfd69cdc5966ae454e35cd6e976686131bfda8d.zip
chore: make the linter happier (#3245)
* chore: make the linter happier * chore: remove reference to maligned linter in .golangci.yml
Diffstat (limited to 'modules.go')
-rw-r--r--modules.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules.go b/modules.go
index bd1f0e977..d8d6fdd60 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)