Просмотр исходного кода

Renamed PortAllocator.populate() to run()

Solomon Hykes 12 лет назад
Родитель
Сommit
f344212b93
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      network.go

+ 2 - 2
network.go

@@ -163,7 +163,7 @@ type PortAllocator struct {
 	ports chan (int)
 	ports chan (int)
 }
 }
 
 
-func (alloc *PortAllocator) populate(start, end int) {
+func (alloc *PortAllocator) run(start, end int) {
 	alloc.ports = make(chan int, end-start)
 	alloc.ports = make(chan int, end-start)
 	for port := start; port < end; port++ {
 	for port := start; port < end; port++ {
 		alloc.ports <- port
 		alloc.ports <- port
@@ -192,7 +192,7 @@ func (alloc *PortAllocator) Release(port int) error {
 
 
 func newPortAllocator(start, end int) (*PortAllocator, error) {
 func newPortAllocator(start, end int) (*PortAllocator, error) {
 	allocator := &PortAllocator{}
 	allocator := &PortAllocator{}
-	allocator.populate(start, end)
+	allocator.run(start, end)
 	return allocator, nil
 	return allocator, nil
 }
 }