Fix govet warnings
authorAbhishek Chanda <abhishek.becs@gmail.com>
Wed, 16 Mar 2016 23:25:41 +0000 (16:25 -0700)
committerAbhishek Chanda <abhishek.becs@gmail.com>
Wed, 16 Mar 2016 23:25:41 +0000 (16:25 -0700)
plugins/ipam/host-local/allocator.go

index 159e2cb..2b867ce 100644 (file)
@@ -104,7 +104,7 @@ func (a *IPAllocator) Get(id string) (*types.IPConfig, error) {
 
                if reserved {
                        return &types.IPConfig{
-                               IP:      net.IPNet{requestedIP, a.conf.Subnet.Mask},
+                               IP:      net.IPNet{IP: requestedIP, Mask: a.conf.Subnet.Mask},
                                Gateway: gw,
                                Routes:  a.conf.Routes,
                        }, nil
@@ -124,7 +124,7 @@ func (a *IPAllocator) Get(id string) (*types.IPConfig, error) {
                }
                if reserved {
                        return &types.IPConfig{
-                               IP:      net.IPNet{cur, a.conf.Subnet.Mask},
+                               IP:      net.IPNet{IP: cur, Mask: a.conf.Subnet.Mask},
                                Gateway: gw,
                                Routes:  a.conf.Routes,
                        }, nil