Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/evaluate/cgroups.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
Copyright 2022 The Authors of https://github.com/CDK-TEAM/CDK .

Expand Down Expand Up @@ -27,7 +26,7 @@ import (
func DumpCgroup() {

cgroupLst, err := util.GetCgroup(1)
sLst := make([]string, len(cgroupLst))
sLst := make([]string, 0, len(cgroupLst))

if err != nil {
log.Printf("/proc/1/cgroup error: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func GetMountInfo() ([]MountInfo, error) {
ret = append(ret, strings.Trim(line, "\n"))
}
// 2346 2345 0:261 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
mountInfos := make([]MountInfo, len(ret))
mountInfos := make([]MountInfo, 0, len(ret))

for _, r := range ret {
parts := strings.Split(r, " - ")
Expand Down