mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
Fixed parsing error where 'day,' is ignored
This commit is contained in:
parent
29699cd493
commit
62e5850726
@ -65,7 +65,7 @@ func UptimeWithContext(ctx context.Context) (uint64, error) {
|
||||
var days uint64 = 0
|
||||
var hours uint64 = 0
|
||||
var minutes uint64 = 0
|
||||
if ut[3] == "days," {
|
||||
if ut[3] == "day," || ut[3] == "days," {
|
||||
days, err = strconv.ParseUint(ut[2], 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user