mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add a missing require and a missing var declaration to system_info.go
This commit is contained in:
parent
4a3651286e
commit
2ef2e26288
@ -2,6 +2,7 @@ package system
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/senorprogrammer/wtf/wtf"
|
"github.com/senorprogrammer/wtf/wtf"
|
||||||
@ -18,13 +19,14 @@ func NewSystemInfo() *SystemInfo {
|
|||||||
|
|
||||||
arg := []string{}
|
arg := []string{}
|
||||||
|
|
||||||
|
var cmd *exec.Cmd
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "linux":
|
case "linux":
|
||||||
cmd := exec.Command("uname -a", arg...)
|
cmd = exec.Command("uname -a", arg...)
|
||||||
case "darwin":
|
case "darwin":
|
||||||
cmd := exec.Command("sw_vers", arg...)
|
cmd = exec.Command("sw_vers", arg...)
|
||||||
default:
|
default:
|
||||||
cmd := exec.Command("sw_vers", arg...)
|
cmd = exec.Command("sw_vers", arg...)
|
||||||
}
|
}
|
||||||
|
|
||||||
raw := wtf.ExecuteCommand(cmd)
|
raw := wtf.ExecuteCommand(cmd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user