Skip to content

Commit

Permalink
fix build failure and panic on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed May 16, 2014
1 parent 0f0c4c9 commit 1ed1140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions net_windows.go
Expand Up @@ -11,7 +11,7 @@ import (
)

var (
modiphlpapi = NewLazyDLL("iphlpapi.dll")
modiphlpapi = syscall.NewLazyDLL("iphlpapi.dll")
procGetExtendedTcpTable = modiphlpapi.NewProc("GetExtendedTcpTable")
procGetExtendedUdpTable = modiphlpapi.NewProc("GetExtendedUdpTable")
)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion process_windows.go
Expand Up @@ -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) {
Expand Down

0 comments on commit 1ed1140

Please sign in to comment.