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()
|
pos := c.Next()
|
||||||
last := c.Last()
|
last := c.Last()
|
||||||
for ; pos != nil && pos != last; pos = c.Next() {
|
for ; pos != nil && pos != last; pos = c.Next() {
|
||||||
net := &net.IPAddr{IP: pos.IP}
|
n := &net.IPAddr{IP: pos.IP}
|
||||||
cidr := a.CIDR(net)
|
cidr := a.CIDR(n)
|
||||||
ok, e := a.store.Exists(cidr)
|
ok, e := a.store.Exists(cidr)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return nil, e
|
return nil, e
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
a.store.Add(cidr)
|
a.store.Add(cidr)
|
||||||
ip = net
|
ip = n
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue