table/iterator.go
func (itr *blockIterator) Seek(key []byte, whence int) {
	itr.err = nil

	switch whence {
	case origin:
		itr.Reset()
	case current:
	}

	var done bool
	for itr.Init(); itr.Valid(); itr.Next() {
		k := itr.Key()
		if y.CompareKeys(k, key) >= 0 {
			// We are done as k is >= key.
			done = true
			break
		}
	}
	if !done {
		itr.err = io.EOF
	}
}
func (itr *blockIterator) Seek(key []byte, whence int) {
	itr.err = nil

	switch whence {
	case origin:
		itr.Reset()
	case current:
	}

	var done bool
	for itr.Init(); itr.Valid(); itr.Next() {
		k := itr.Key()
		if y.CompareKeys(k, key) >= 0 {
			// We are done as k is >= key.
			done = true
			break
		}
	}
	if !done {
		itr.err = io.EOF
	}
}
func ( itr * blockIterator ) Seek ( key [ ] byte , whence int ) { itr . err = nil switch whence { case origin : itr . Reset ( ) case current : } var done bool for itr . Init ( ) ; itr . Valid ( ) ; itr . Next ( ) { k := itr . Key ( ) if y . CompareKeys ( k , key ) >= 0 { // We are done as k is >= key. done = true break } } if ! done { itr . err = io . EOF } }
// Seek brings us to the first block element that is >= input key.
Seek brings us to the first block element that is > = input key .