mirror of
https://github.com/taigrr/systemctl.git
synced 2025-10-05 16:26:58 +08:00
Finish tests for helper methods
This commit is contained in:
@@ -30,6 +30,9 @@ func GetMemoryUsage(ctx context.Context, unit string, opts Options) (int, error)
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
if value == "[not set]" {
|
||||
return -1, ErrValueNotSet
|
||||
}
|
||||
return strconv.Atoi(value)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user