code: func filterNonPassing(nodes structs.CheckServiceNodes) structs.CheckServiceNodes {
  	n := len(nodes)
  
  	// Make a copy of the cached nodes rather than operating on the cache directly
  	out := append(nodes[:0:0], nodes...)
  
  OUTER:
  	for i := 0; i < n; i++ {
  		node := out[i]
  		for _, check := range node.Checks {
  			if check.Status != api.HealthPassing {
  				out[i], out[n-1] = out[n-1], structs.CheckServiceNode{}
  				n--
  				i--
  				continue OUTER
  			}
  		}
  	}
  	return out[:n]
  }
docs: // filterNonPassing is used to filter out any nodes that have check that are not passing