code: func (s *Stat) NetIOStats() []*NetIOStats {
  	s.Lock()
  	defer s.Unlock()
  
  	var res []*NetIOStats
  
  	do(func() {
  		var nSize C.size_t
  		var cArray *C.sg_network_io_stats = C.sg_get_network_io_stats_diff(&nSize)
  		length := int(nSize)
  		slice := (*[1 << 16]C.sg_network_io_stats)(unsafe.Pointer(cArray))[:length:length]
  
  		for _, v := range slice {
  			n := &NetIOStats{
  				IntName:    C.GoString(v.interface_name),
  				TX:         int(v.tx),
  				RX:         int(v.rx),
  				IPackets:   int(v.ipackets),
  				OPackets:   int(v.opackets),
  				IErrors:    int(v.ierrors),
  				OErrors:    int(v.oerrors),
  				Collisions: int(v.collisions),
  				Period:     time.Duration(int(v.systime)) * time.Second,
  				TimeTaken:  time.Now(),
  			}
  
  			res = append(res, n)
  		}
  	})
  	return res
  }
docs: // NetIOStats get interface ios related stats
  // Go equivalent to sg_get_network_io_stats