mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: address golangci-lint issues
address golangci-lint issues in utils Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
8c4a38eec6
commit
4b7cafe821
@ -70,7 +70,7 @@ func getCgroupPidsFile() (string, error) {
|
||||
}
|
||||
}
|
||||
if slice == "" {
|
||||
return "", fmt.Errorf("could not find a cgroup for 'pids'")
|
||||
return "", errors.New("could not find a cgroup for 'pids'")
|
||||
}
|
||||
|
||||
return pidsMax, nil
|
||||
@ -112,7 +112,7 @@ func GetPIDLimit() (int, error) {
|
||||
func SetPIDLimit(limit int) error {
|
||||
limitStr := "max"
|
||||
if limit != -1 {
|
||||
limitStr = fmt.Sprintf("%d", limit)
|
||||
limitStr = strconv.Itoa(limit)
|
||||
}
|
||||
|
||||
pidsMax, err := getCgroupPidsFile()
|
||||
|
Reference in New Issue
Block a user