mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
fix build failure and panic on Windows.
This commit is contained in:
parent
0f0c4c99c1
commit
1ed1140089
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
modiphlpapi = NewLazyDLL("iphlpapi.dll")
|
||||
modiphlpapi = syscall.NewLazyDLL("iphlpapi.dll")
|
||||
procGetExtendedTcpTable = modiphlpapi.NewProc("GetExtendedTcpTable")
|
||||
procGetExtendedUdpTable = modiphlpapi.NewProc("GetExtendedUdpTable")
|
||||
)
|
||||
@ -72,7 +72,7 @@ func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||
func NetConnections(kind string) ([]NetConnectionStat, error) {
|
||||
var ret []NetConnectionStat
|
||||
|
||||
return ret, erros.New("not implemented yet")
|
||||
return ret, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
// borrowed from src/pkg/net/interface_windows.go
|
||||
|
@ -164,7 +164,8 @@ func (p *Process) IsRunning() (bool, error) {
|
||||
}
|
||||
|
||||
func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) {
|
||||
return nil, errors.New("not implemented yet")
|
||||
ret := make([]MemoryMapsStat, 0)
|
||||
return &ret, errors.New("not implemented yet")
|
||||
}
|
||||
|
||||
func NewProcess(pid int32) (*Process, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user