// Peek returns an arbitrary element from the set. If the set was empty, this
// returns ("", false).
510782
func (s Set) Peek() (string, bool) {
	for k := range s {
		return k, true
	}
	return "", false
}
111557
func (t *Template) peek() item {
	if t.peekCount > 0 {
		return t.token[t.peekCount-1]
	}
	t.peekCount = 1
	t.token[0] = t.lex.nextItem()
	return t.token[0]
}
123892
func (t *Tree) peek() item {
	if t.peekCount > 0 {
		return t.token[t.peekCount-1]
	}
	t.peekCount = 1
	t.token[0] = t.lex.nextItem()
	return t.token[0]
}
922481
func (q *EvictingStringQueue) PeekAll() []string {
	q.mu.Lock()
	vals := make([]string, len(q.vals))
	copy(vals, q.vals)
	q.mu.Unlock()
	for i, j := 0, len(vals)-1; i < j; i, j = i+1, j-1 {
		vals[i], vals[j] = vals[j], vals[i]
	}
	return vals
}
167859
func (b *ByteBuf) PeekN(offset int, n int) ([]byte, error) {
	if b.Readable() < n+offset {
		return nil, io.ErrShortBuffer
	}

	start := b.readerIndex + offset
	return b.buf[start : start+n], nil
}
624631
func (p *Parser) peek() rune {
	r := p.next()
	p.backup()
	return r
}
978925
func (rb *ringBuffer) Peek() (interface{}, bool) {
	if rb.start.used == false {
		return nil, false
	}
	return rb.start.value, true
}
1315632
func (b *BufferedSeriesIterator) PeekBack() (t int64, v float64, ok bool) {
	return b.buf.last()
}
763180
func (this *Beanstalkd) Peek(id uint64) (*Job, error) {
	e := this.send("peek %d\r\n", id)
	if e != nil {
		return nil, e
	}
	return this.handlePeekReply()
}
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]
}
1203376
func (s *scanner) peekPos() int {
	if s.readPos >= len(s.stateRecord){
		return  s.cacheRecord.pos// peek can be called when the array is over , only if unmarshal error occured, so return last read position 
	}
	if !s.cached {
		s.cached = true
		s.cacheRecord = s.stateRecord[s.readPos]
	}
	return s.cacheRecord.pos
}
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
}
50376
func (pq *PriorityQueue) Peek() Item {
	pq.lock.Lock()
	defer pq.lock.Unlock()
	if len(pq.items) > 0 {
		return pq.items[0]
	}
	return nil
}
53742
func (t *Tree) peek() token {
	tok := t.next()
	t.backup()

	return tok
}
744876
func (p *parser) peek() item {
	if p.peekItem == nil {
		itm := p.lex.nextSignificantItem()
		p.peekItem = &itm
	}
	return *p.peekItem
}
1160769
func (c *ARCCache) Peek(key interface{}) (value interface{}, ok bool) {
	c.lock.RLock()
	defer c.lock.RUnlock()
	if val, ok := c.t1.Peek(key); ok {
		return val, ok
	}
	return c.t2.Peek(key)
}
1161834
func (self *Stack) Peek() Token {
	if len(self.Values) == 0 {
		return Token{}
	}
	return self.Values[len(self.Values)-1]
}