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
53c1a7938c
commit
225094c978
@ -2,6 +2,7 @@ package system
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
@ -18,13 +19,14 @@ func NewSystemInfo() *SystemInfo {
|
||||
|
||||
arg := []string{}
|
||||
|
||||
var cmd *exec.Cmd
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
cmd := exec.Command("uname -a", arg...)
|
||||
cmd = exec.Command("uname -a", arg...)
|
||||
case "darwin":
|
||||
cmd := exec.Command("sw_vers", arg...)
|
||||
cmd = exec.Command("sw_vers", arg...)
|
||||
default:
|
||||
cmd := exec.Command("sw_vers", arg...)
|
||||
cmd = exec.Command("sw_vers", arg...)
|
||||
}
|
||||
|
||||
raw := wtf.ExecuteCommand(cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user