mirror of
https://github.com/taigrr/systemctl.git
synced 2026-03-09 00:14:38 -07: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