فهرست منبع

Update hostpool.go

the preview code would return len(p.hosts) empty string first,then the true hosts.
Jiahao Huang 11 سال پیش
والد
کامیت
a7729ac757
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      hostpool.go

+ 1 - 1
hostpool.go

@@ -184,7 +184,7 @@ func (p *standardHostPool) markFailed(hostR HostPoolResponse) {
 
 }
 func (p *standardHostPool) Hosts() []string {
-	hosts := make([]string, len(p.hosts))
+	hosts := make([]string, 0, len(p.hosts))
 	for host := range p.hosts {
 		hosts = append(hosts, host)
 	}