seekTo returns false if the needle was not found and the current index was left unchanged.
(needle resolver.Address)
| 917 | // seekTo returns false if the needle was not found and the current index was |
| 918 | // left unchanged. |
| 919 | func (al *addressList) seekTo(needle resolver.Address) bool { |
| 920 | for ai, addr := range al.addresses { |
| 921 | if !equalAddressIgnoringBalAttributes(&addr, &needle) { |
| 922 | continue |
| 923 | } |
| 924 | al.idx = ai |
| 925 | return true |
| 926 | } |
| 927 | return false |
| 928 | } |
| 929 | |
| 930 | // hasNext returns whether incrementing the addressList will result in moving |
| 931 | // past the end of the list. If the list has already moved past the end, it |