some improvements
This commit is contained in:
parent
501d579a90
commit
d6c9b69b9c
3 changed files with 24 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue