mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Renamed PortAllocator.populate() to run()
This commit is contained in:
parent
0424998f38
commit
f344212b93
1 changed files with 2 additions and 2 deletions
|
@ -163,7 +163,7 @@ type PortAllocator struct {
|
|||
ports chan (int)
|
||||
}
|
||||
|
||||
func (alloc *PortAllocator) populate(start, end int) {
|
||||
func (alloc *PortAllocator) run(start, end int) {
|
||||
alloc.ports = make(chan int, end-start)
|
||||
for port := start; port < end; port++ {
|
||||
alloc.ports <- port
|
||||
|
@ -192,7 +192,7 @@ func (alloc *PortAllocator) Release(port int) error {
|
|||
|
||||
func newPortAllocator(start, end int) (*PortAllocator, error) {
|
||||
allocator := &PortAllocator{}
|
||||
allocator.populate(start, end)
|
||||
allocator.run(start, end)
|
||||
return allocator, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue