From 1f9466536e7800627f238adad08e8fa57321c83f Mon Sep 17 00:00:00 2001 From: litong Date: Thu, 18 Jul 2019 15:21:21 +0800 Subject: [PATCH] Add ifIndex support --- net/net.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.go b/net/net.go index f724d7f..a31a434 100644 --- a/net/net.go +++ b/net/net.go @@ -26,6 +26,7 @@ type IOCountersStat struct { Dropout uint64 `json:"dropout"` // total number of outgoing packets which were dropped (always 0 on OSX and BSD) Fifoin uint64 `json:"fifoin"` // total number of FIFO buffers errors while receiving Fifoout uint64 `json:"fifoout"` // total number of FIFO buffers errors while sending + } // Addr is implemented compatibility to psutil @@ -121,7 +122,6 @@ func InterfacesWithContext(ctx context.Context) ([]InterfaceStat, error) { for _, ifi := range is { var flags []string - if ifi.Flags&net.FlagUp != 0 { flags = append(flags, "up") }