diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-11 14:40:38 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-15 07:05:56 -0400 |
commit | 200cfa41a434b7143620c2c252b3eb7ab3ef92f9 (patch) | |
tree | ccf0cb95297dc65d4dc8bd366963e2b037fb1a8b /pkg/cgroups/cgroups.go | |
parent | 3f026eb6a682a68e69f9376b72157a8f084e575c (diff) | |
download | podman-200cfa41a434b7143620c2c252b3eb7ab3ef92f9.tar.gz podman-200cfa41a434b7143620c2c252b3eb7ab3ef92f9.tar.bz2 podman-200cfa41a434b7143620c2c252b3eb7ab3ef92f9.zip |
Turn on More linters
- misspell
- prealloc
- unparam
- nakedret
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/cgroups/cgroups.go')
-rw-r--r-- | pkg/cgroups/cgroups.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go index 3b56f944f..399072108 100644 --- a/pkg/cgroups/cgroups.go +++ b/pkg/cgroups/cgroups.go @@ -133,7 +133,7 @@ func getAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool) if err != nil { return nil, errors.Wrapf(err, "read directory %s", cgroupRoot) } - var controllers []controller + controllers := []controller{} for _, i := range infos { name := i.Name() if _, found := exclude[name]; found { @@ -505,7 +505,7 @@ func (c *CgroupControl) AddPid(pid int) error { return nil } - var names []string + names := make([]string, 0, len(handlers)) for n := range handlers { names = append(names, n) } |