Skip to content

Commit

Permalink
Removed repeated logic for days
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan committed Jun 6, 2024
1 parent 33265e1 commit b1ddedd
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions host/host_aix.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ func UptimeWithContext(ctx context.Context) (uint64, error) {
// Initialise variables
var days, hours, mins uint64

// Check if days are specified and parse them
if ut[3] == "day," || ut[3] == "days," {
days, err = strconv.ParseUint(ut[2], 10, 64)
if err != nil {
return 0, err
}
}

switch {
case ut[3] == "day," || ut[3] == "days,":
days, err = strconv.ParseUint(ut[2], 10, 64)
Expand Down

0 comments on commit b1ddedd

Please sign in to comment.