diff options
Diffstat (limited to 'vendor/github.com/shirou/gopsutil/host/host_darwin.go')
-rw-r--r-- | vendor/github.com/shirou/gopsutil/host/host_darwin.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/shirou/gopsutil/host/host_darwin.go b/vendor/github.com/shirou/gopsutil/host/host_darwin.go index c82d990..acefc2f 100644 --- a/vendor/github.com/shirou/gopsutil/host/host_darwin.go +++ b/vendor/github.com/shirou/gopsutil/host/host_darwin.go @@ -40,7 +40,7 @@ func InfoWithContext(ctx context.Context) (*InfoStat, error) { uname, err := exec.LookPath("uname") if err == nil { - out, err := invoke.Command(uname, "-r") + out, err := invoke.CommandWithContext(ctx, uname, "-r") if err == nil { ret.KernelVersion = strings.ToLower(strings.TrimSpace(string(out))) } @@ -70,7 +70,7 @@ func InfoWithContext(ctx context.Context) (*InfoStat, error) { ret.Procs = uint64(len(procs)) } - values, err := common.DoSysctrl("kern.uuid") + values, err := common.DoSysctrlWithContext(ctx, "kern.uuid") if err == nil && len(values) == 1 && values[0] != "" { ret.HostID = strings.ToLower(values[0]) } @@ -90,7 +90,7 @@ func BootTimeWithContext(ctx context.Context) (uint64, error) { if t != 0 { return t, nil } - values, err := common.DoSysctrl("kern.boottime") + values, err := common.DoSysctrlWithContext(ctx, "kern.boottime") if err != nil { return 0, err } @@ -188,12 +188,12 @@ func PlatformInformationWithContext(ctx context.Context) (string, string, string return "", "", "", err } - out, err := invoke.Command(uname, "-s") + out, err := invoke.CommandWithContext(ctx, uname, "-s") if err == nil { platform = strings.ToLower(strings.TrimSpace(string(out))) } - out, err = invoke.Command(sw_vers, "-productVersion") + out, err = invoke.CommandWithContext(ctx, sw_vers, "-productVersion") if err == nil { pver = strings.ToLower(strings.TrimSpace(string(out))) } |