1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-05-01 13:48:52 +08:00

Make limitToUint parse to uint instead of int

This commit is contained in:
Damilola Bello 2021-04-23 21:30:29 -04:00
parent c7a38de76e
commit 61c36c7b8c

View File

@ -485,11 +485,11 @@ func limitToUint(val string) (uint64, error) {
if val == "unlimited" { if val == "unlimited" {
return math.MaxUint64, nil return math.MaxUint64, nil
} else { } else {
res, err := strconv.ParseInt(val, 10, 32) res, err := strconv.ParseUint(val, 10, 64)
if err != nil { if err != nil {
return 0, err return 0, err
} }
return uint64(res), nil return res, nil
} }
} }