diff --git a/ipconfig.go b/ipconfig.go index 6459faf..6e77195 100644 --- a/ipconfig.go +++ b/ipconfig.go @@ -24,9 +24,9 @@ func (c *IPConfigs) Set(index int, ipc *IPConfig) { (*c)[index] = ipc } -func (c IPConfigs) Get(index int) *IPConfig { - if len(c)-1 >= index { - return c[index] +func (c *IPConfigs) Get(index int) *IPConfig { + if len(*c)-1 >= index { + return (*c)[index] } return nil } diff --git a/network.go b/network.go index 1ec084c..0828578 100644 --- a/network.go +++ b/network.go @@ -25,9 +25,9 @@ func (c *NetworkDevices) Set(index int, d *NetworkDevice) { (*c)[index] = d } -func (c NetworkDevices) Get(index int) *NetworkDevice { - if len(c)-1 >= index { - return c[index] +func (c *NetworkDevices) Get(index int) *NetworkDevice { + if len(*c)-1 >= index { + return (*c)[index] } return nil }