// peek, but no consume
509598
func (l *pageLexer) peek() rune {
	r := l.next()
	l.backup()
	return r
}
734870
func (c *ItemConsume) Peek() LexItem {
	if c.peekCount > 0 {
		return c.items[c.peekCount-1]
	}
	c.peekCount = 1
	c.items[0] = c.lexer.NextItem()
	return c.items[0]
}
700039
func (q *ListQueue) Peek() (interface{}, error) {
	if q.IsEmpty() {
		return nil, errors.New("unable to peek element, queue is empty")
	}
	return q.first.item, nil
}
1013718
func (b *Buffer) Peek() (interface{}, error) {
	var ln int
	var v interface{}

	b.rw.RLock()
	{
		if ln = len(b.buffer); ln > 0 {
			v = b.buffer[0]
		}
	}
	b.rw.RUnlock()

	if ln == 0 {
		return nil, ErrBufferEmpty
	}

	return v, nil
}
1113577
func (p PendingPlans) Peek() *pendingPlan {
	n := len(p)
	if n == 0 {
		return nil
	}
	return p[n-1]
}
778375
func Peek(xu *xgbutil.XUtil) []xgbutil.EventOrError {
	xu.EvqueueLck.RLock()
	defer xu.EvqueueLck.RUnlock()

	cpy := make([]xgbutil.EventOrError, len(xu.Evqueue))
	copy(cpy, xu.Evqueue)
	return cpy
}
1003863
func (m *minifier) peek() int {
	m.theLookahead = m.get()
	return m.theLookahead
}
1064225
func (s *FIFO) Peek() (T, bool) {
	if s.front == nil {
		return nil, false
	}
	return s.front.v, true
}
1161834
func (self *Stack) Peek() Token {
	if len(self.Values) == 0 {
		return Token{}
	}
	return self.Values[len(self.Values)-1]
}
473974
func (e *endpoint) Peek(vec [][]byte) (uintptr, tcpip.ControlMessages, *tcpip.Error) {
	e.mu.RLock()
	defer e.mu.RUnlock()

	// The endpoint can be read if it's connected, or if it's already closed
	// but has some pending unread data.
	if s := e.state; s != stateConnected && s != stateClosed {
		if s == stateError {
			return 0, tcpip.ControlMessages{}, e.hardError
		}
		return 0, tcpip.ControlMessages{}, tcpip.ErrInvalidEndpointState
	}

	e.rcvListMu.Lock()
	defer e.rcvListMu.Unlock()

	if e.rcvBufUsed == 0 {
		if e.rcvClosed || e.state != stateConnected {
			return 0, tcpip.ControlMessages{}, tcpip.ErrClosedForReceive
		}
		return 0, tcpip.ControlMessages{}, tcpip.ErrWouldBlock
	}

	// Make a copy of vec so we can modify the slide headers.
	vec = append([][]byte(nil), vec...)

	var num uintptr

	for s := e.rcvList.Front(); s != nil; s = s.Next() {
		views := s.data.Views()

		for i := s.viewToDeliver; i < len(views); i++ {
			v := views[i]

			for len(v) > 0 {
				if len(vec) == 0 {
					return num, tcpip.ControlMessages{}, nil
				}
				if len(vec[0]) == 0 {
					vec = vec[1:]
					continue
				}

				n := copy(vec[0], v)
				v = v[n:]
				vec[0] = vec[0][n:]
				num += uintptr(n)
			}
		}
	}

	return num, tcpip.ControlMessages{}, nil
}
755615
func (b *Buffer) PeekBack() float64 {
	if b.size == 0 {
		return 0
	}
	if b.tail == 0 {
		return b.array[len(b.array)-1]
	}
	return b.array[b.tail-1]
}
1242903
func (t *Tube) PeekDelayed() (id uint64, body []byte, err error) {
	r, err := t.Conn.cmd(t, nil, nil, "peek-delayed")
	if err != nil {
		return 0, nil, err
	}
	body, err = t.Conn.readResp(r, true, "FOUND %d", &id)
	if err != nil {
		return 0, nil, err
	}
	return id, body, nil
}
1334887
func (c *LRU) Peek(base int64) (exist bool, next int64) {
	c.mu.RLock()
	defer c.mu.RUnlock()

	n, exist := c.table[base]
	if !exist {
		return false, -1
	}
	next = n.b.NextBase()
	return exist, next
}
750308
func (q *Queue) Peek() (*Item, error) {
	q.RLock()
	defer q.RUnlock()

	// Check if queue is closed.
	if !q.isOpen {
		return nil, ErrDBClosed
	}

	return q.getItemByID(q.head + 1)
}
803361
func (lx *lexer) peek() rune {
	r := lx.next()
	lx.backup()
	return r
}
1361991
func (q *Queue) Peek() (interface{}, error) {
	q.lock.Lock()
	defer q.lock.Unlock()

	if q.disposed {
		return nil, ErrDisposed
	}

	peekItem, ok := q.items.peek()
	if !ok {
		return nil, ErrEmptyQueue
	}

	return peekItem, nil
}
581354
func (l *Lexer) peek() rune {
	r := l.next()
	l.backup()
	return r
}