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

Method popAssert

dql/math.go:26–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24func (s *mathTreeStack) push(t *MathTree) { s.a = append(s.a, t) }
25
26func (s *mathTreeStack) popAssert() *MathTree {
27 x.AssertTruef(!s.empty(), "Expected a non-empty stack")
28 last := s.a[len(s.a)-1]
29 s.a = s.a[:len(s.a)-1]
30 return last
31}
32
33func (s *mathTreeStack) pop() (*MathTree, error) {
34 if s.empty() {

Callers 1

evalMathStackFunction · 0.45

Calls 2

emptyMethod · 0.95
AssertTruefFunction · 0.92

Tested by

no test coverage detected