fix build darwin

This commit is contained in:
TenderIronh
2021-12-09 11:26:59 +08:00
parent 8353c1c3dd
commit a2387fed68
+10
View File
@@ -1,6 +1,7 @@
package main package main
import ( import (
"bytes"
"crypto/aes" "crypto/aes"
"crypto/cipher" "crypto/cipher"
"crypto/tls" "crypto/tls"
@@ -8,6 +9,7 @@ import (
"fmt" "fmt"
"net" "net"
"net/http" "net/http"
"os/exec"
"time" "time"
) )
@@ -138,3 +140,11 @@ func netInfo() *NetInfo {
} }
return nil return nil
} }
func execOutput(name string, args ...string) string {
cmdGetOsName := exec.Command(name, args...)
var cmdOut bytes.Buffer
cmdGetOsName.Stdout = &cmdOut
cmdGetOsName.Run()
return cmdOut.String()
}