some improvements

This commit is contained in:
ston1th 2020-06-01 13:59:16 +02:00
commit d6c9b69b9c
3 changed files with 24 additions and 3 deletions

View file

@ -7,6 +7,15 @@ import (
"strings"
)
type NetworkDevices []*NetworkDevice
func (c NetworkDevice) Get(index int) *NetworkDevice {
if len(c)-1 >= index {
return c[index]
}
return nil
}
type NetworkDevice struct {
Type string
MACAddress string