func (b *Buffer) seek(seqno SeqNo) (readable bool) {
	b.x__.Lock()
	defer b.x__.Unlock()
	if seqno > b.nwritten {
		panic("seeking to unwritten message")
	}
	for iter, e := b.nremoved, b.list.Front(); e != nil; iter, e = iter+1, e.Next() {
		switch {
		case iter < seqno:
		case iter == seqno:
			b.cursor, b.seqno = e, iter
			return true
		default:
			panic("u")
		}
	}
	b.cursor, b.seqno = nil, 0
	return false
}
// seek panics if the requested seqno is after the last message written
// seek returns true if the resulting cursor position is readable.
seek panics if the requested seqno is after the last message written
seek returns true if the resulting cursor position is readable.
// seek panics if the requested seqno is after the last message written // seek returns true if the resulting cursor position is readable .
func (b *Buffer) seek(seqno SeqNo) (readable bool) {
	b.x__.Lock()
	defer b.x__.Unlock()
	if seqno > b.nwritten {
		panic("seeking to unwritten message")
	}
	for iter, e := b.nremoved, b.list.Front(); e != nil; iter, e = iter+1, e.Next() {
		switch {
		case iter < seqno:
		case iter == seqno:
			b.cursor, b.seqno = e, iter
			return true
		default:
			panic("u")
		}
	}
	b.cursor, b.seqno = nil, 0
	return false
}
func ( b * Buffer ) seek ( seqno SeqNo ) ( readable bool ) { b . x__ . Lock ( ) defer b . x__ . Unlock ( ) if seqno > b . nwritten { panic ( " " ) } for iter , e := b . nremoved , b . list . Front ( ) ; e != nil ; iter , e = iter + 1 , e . Next ( ) { switch { case iter < seqno : case iter == seqno : b . cursor , b . seqno = e , iter return true default : panic ( " " ) } } b . cursor , b . seqno = nil , 0 return false }
seek panics if the requested seqno is after the last message written
seek returns true if the resulting cursor position is readable.
seek panics if the requested seqno is after the last message written seek returns true if the resulting cursor position is readable .