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 }