1
0
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:
Chris Cummer 2018-06-01 09:13:21 -07:00
parent 53c1a7938c
commit 225094c978

View File

@ -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)