MCPcopy Create free account
hub / github.com/cel-expr/cel-go / reduceHeight

Function reduceHeight

policy/composer.go:616–625  ·  view source on GitHub ↗
(heights map[int64]int, e ast.NavigableExpr, amount int)

Source from the content-addressed store, hash-verified

614}
615
616func reduceHeight(heights map[int64]int, e ast.NavigableExpr, amount int) {
617 height := heights[e.ID()]
618 if height < amount {
619 return
620 }
621 heights[e.ID()] = height - amount
622 if parent, hasParent := e.Parent(); hasParent {
623 reduceHeight(heights, parent, amount)
624 }
625}

Callers 1

maybeUnnestRuleMethod · 0.85

Calls 2

IDMethod · 0.65
ParentMethod · 0.65

Tested by

no test coverage detected