MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / pop

Method pop

dql/parser.go:1546–1553  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1544}
1545
1546func (s *filterTreeStack) pop() (*FilterTree, error) {
1547 if s.empty() {
1548 return nil, errors.Errorf("Empty stack")
1549 }
1550 last := s.a[len(s.a)-1]
1551 s.a = s.a[:len(s.a)-1]
1552 return last, nil
1553}
1554
1555func (s *filterTreeStack) peek() *FilterTree {
1556 x.AssertTruef(!s.empty(), "Trying to peek empty stack")

Callers 2

evalStackFunction · 0.45
parseFilterFunction · 0.45

Calls 2

emptyMethod · 0.95
ErrorfMethod · 0.45

Tested by

no test coverage detected