修改:1、去掉network中ethtool
This commit is contained in:
parent
1139ef9ded
commit
e88221f8e6
|
@ -6,3 +6,4 @@ selfpara/
|
|||
log/
|
||||
.DS_Store
|
||||
openGW
|
||||
openGW.exe
|
||||
|
|
|
@ -12,8 +12,6 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/safchain/ethtool"
|
||||
)
|
||||
|
||||
type NetworkNameListTemplate struct {
|
||||
|
@ -60,13 +58,13 @@ func (n *NetworkParamListTemplate) AddNetworkParam(param NetworkParamTemplate) e
|
|||
|
||||
func (n *NetworkParamTemplate) GetNetworkStatus() {
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
ethHandle, _ := ethtool.NewEthtool()
|
||||
defer ethHandle.Close()
|
||||
|
||||
n.LinkStatus, _ = ethHandle.LinkState(n.Name)
|
||||
Logger.Debugf("%v LinkStatus %v", n.Name, n.LinkStatus)
|
||||
}
|
||||
//if runtime.GOOS == "linux" {
|
||||
// ethHandle, _ := ethtool.NewEthtool()
|
||||
// defer ethHandle.Close()
|
||||
//
|
||||
// n.LinkStatus, _ = ethHandle.LinkState(n.Name)
|
||||
// Logger.Debugf("%v LinkStatus %v", n.Name, n.LinkStatus)
|
||||
//}
|
||||
}
|
||||
|
||||
//获取当前网络参数
|
||||
|
|
Loading…
Reference in New Issue