16 lines
298 B
Go
16 lines
298 B
Go
package system
|
|
|
|
import (
|
|
"github.com/shirou/gopsutil/net"
|
|
)
|
|
|
|
func (i *InfoUtils) GetNetWorkConnection() []net.ConnectionStat {
|
|
info, _ := net.Connections("all")
|
|
return info
|
|
}
|
|
|
|
func (i *InfoUtils) GetNetworkCounter(all bool) []net.IOCountersStat {
|
|
info, _ := net.IOCounters(!all)
|
|
return info
|
|
}
|