pkg/system: remove github.com/docker/go-units dependency
This is not "very" important, but this dependency was only used for a single const, which could be satisfied with a comment. Not very urgent, as github.com/docker/go-units is likely imported through other ways already (but it's nice to have the package be more isolated). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
25ee00c494
commit
dee9f422c8
|
@ -6,8 +6,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
units "github.com/docker/go-units"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReadMemInfo retrieves memory statistics of the host system and returns a
|
// ReadMemInfo retrieves memory statistics of the host system and returns a
|
||||||
|
@ -42,7 +40,8 @@ func parseMemInfo(reader io.Reader) (*MemInfo, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
bytes := int64(size) * units.KiB
|
// Convert to KiB
|
||||||
|
bytes := int64(size) * 1024
|
||||||
|
|
||||||
switch parts[0] {
|
switch parts[0] {
|
||||||
case "MemTotal:":
|
case "MemTotal:":
|
||||||
|
|
Loading…
Reference in New Issue