func (hps HostPorts) FilterUnusable() HostPorts {
	filtered := make(HostPorts, 0, len(hps))
	for _, addr := range hps {
		switch addr.AddressScope() {
		case ScopeMachineLocal, ScopeLinkLocal:
			continue
		}
		filtered = append(filtered, addr)
	}
	return filtered
}
// FilterUnusable returns a copy of the receiver HostPorts after removing
// any addresses unlikely to be usable (ScopeMachineLocal or ScopeLinkLocal).
FilterUnusable returns a copy of the receiver HostPorts after removing
any addresses unlikely to be usable (ScopeMachineLocal or ScopeLinkLocal).
// FilterUnusable returns a copy of the receiver HostPorts after removing // any addresses unlikely to be usable ( ScopeMachineLocal or ScopeLinkLocal ) .
func (hps HostPorts) FilterUnusable() HostPorts {
	filtered := make(HostPorts, 0, len(hps))
	for _, addr := range hps {
		switch addr.AddressScope() {
		case ScopeMachineLocal, ScopeLinkLocal:
			continue
		}
		filtered = append(filtered, addr)
	}
	return filtered
}
func ( hps HostPorts ) FilterUnusable ( ) HostPorts { filtered := make ( HostPorts , 0 , len ( hps ) ) for _ , addr := range hps { switch addr . AddressScope ( ) { case ScopeMachineLocal , ScopeLinkLocal : continue } filtered = append ( filtered , addr ) } return filtered }
FilterUnusable returns a copy of the receiver HostPorts after removing
any addresses unlikely to be usable (ScopeMachineLocal or ScopeLinkLocal).
FilterUnusable returns a copy of the receiver HostPorts after removing any addresses unlikely to be usable ( ScopeMachineLocal or ScopeLinkLocal ) .