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
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/tls"
@@ -8,6 +9,7 @@ import (
"fmt"
"net"
"net/http"
"os/exec"
"time"
)
@@ -138,3 +140,11 @@ func netInfo() *NetInfo {
}
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()
}