Skip to content

Commit

Permalink
cgroupstats: golangci-lint fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
  • Loading branch information
klihub authored and askervin committed Dec 11, 2024
1 parent 934279f commit 6374791
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cgroupstats/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func walkCgroups() []string {
containerDirs := []string{}

cpuset := filepath.Join(cgroupRoot, "cpuset")
filepath.Walk(filepath.Join(cpuset, kubepodsDir),
err := filepath.Walk(filepath.Join(cpuset, kubepodsDir),
func(path string, info os.FileInfo, err error) error {
if err != nil {
if os.IsNotExist(err) {
Expand Down Expand Up @@ -315,6 +315,9 @@ func walkCgroups() []string {

return nil
})
if err != nil {
log.Warnf("cgroupfs walk failed: %v", err)
}

return containerDirs
}
Expand Down

0 comments on commit 6374791

Please sign in to comment.