sentinel.go
func (s *Sentinel) putToBottom(addr string) {
	addrs := s.Addrs
	if addrs[len(addrs)-1] == addr {
		// Already on bottom.
		return
	}
	newAddrs := []string{}
	for _, a := range addrs {
		if a == addr {
			continue
		}
		newAddrs = append(newAddrs, a)
	}
	newAddrs = append(newAddrs, addr)
	s.Addrs = newAddrs
}
func (s *Sentinel) putToBottom(addr string) {
	addrs := s.Addrs
	if addrs[len(addrs)-1] == addr {
		// Already on bottom.
		return
	}
	newAddrs := []string{}
	for _, a := range addrs {
		if a == addr {
			continue
		}
		newAddrs = append(newAddrs, a)
	}
	newAddrs = append(newAddrs, addr)
	s.Addrs = newAddrs
}
func ( s * Sentinel ) putToBottom ( addr string ) { addrs := s . Addrs if addrs [ len ( addrs ) - 1 ] == addr { // Already on bottom. return } newAddrs := [ ] string { } for _ , a := range addrs { if a == addr { continue } newAddrs = append ( newAddrs , a ) } newAddrs = append ( newAddrs , addr ) s . Addrs = newAddrs }
// putToBottom puts Sentinel address to the bottom of address list.
// We call this method internally when see that some Sentinel failed to answer
// on application request so next time we start with another one.
//
// Lock must be held by caller.
putToBottom puts Sentinel address to the bottom of address list . We call this method internally when see that some Sentinel failed to answer on application request so next time we start with another one . Lock must be held by caller .