mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Preallocate (safe) slices when we know the size (#10459)
This commit is contained in:
@@ -829,8 +829,9 @@ func (client *peerRESTClient) ConsoleLog(logCh chan interface{}, doneCh <-chan s
|
||||
}
|
||||
|
||||
func getRemoteHosts(endpointZones EndpointZones) []*xnet.Host {
|
||||
var remoteHosts []*xnet.Host
|
||||
for _, hostStr := range GetRemotePeers(endpointZones) {
|
||||
peers := GetRemotePeers(endpointZones)
|
||||
remoteHosts := make([]*xnet.Host, 0, len(peers))
|
||||
for _, hostStr := range peers {
|
||||
host, err := xnet.ParseHost(hostStr)
|
||||
if err != nil {
|
||||
logger.LogIf(GlobalContext, err)
|
||||
|
||||
Reference in New Issue
Block a user