linter changes
This commit is contained in:
parent
fbf7fed2ce
commit
5c0ec25695
1 changed files with 3 additions and 3 deletions
6
alloc.go
6
alloc.go
|
|
@ -47,15 +47,15 @@ func (a *GenericAlloc) Alloc() (ip *net.IPAddr, err error) {
|
|||
pos := c.Next()
|
||||
last := c.Last()
|
||||
for ; pos != nil && pos != last; pos = c.Next() {
|
||||
net := &net.IPAddr{IP: pos.IP}
|
||||
cidr := a.CIDR(net)
|
||||
n := &net.IPAddr{IP: pos.IP}
|
||||
cidr := a.CIDR(n)
|
||||
ok, e := a.store.Exists(cidr)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
}
|
||||
if !ok {
|
||||
a.store.Add(cidr)
|
||||
ip = net
|
||||
ip = n
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue