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

Function newIDGenerator

cel/optimizer.go:211–216  ·  view source on GitHub ↗

newIDGenerator ensures that new ids are only created the first time they are encountered.

(seed int64)

Source from the content-addressed store, hash-verified

209
210// newIDGenerator ensures that new ids are only created the first time they are encountered.
211func newIDGenerator(seed int64) *idGenerator {
212 return &idGenerator{
213 idMap: make(map[int64]int64),
214 seed: seed,
215 }
216}
217
218type idGenerator struct {
219 idMap map[int64]int64

Callers 3

OptimizeMethod · 0.85
CopyASTMethod · 0.85
TestAdaptLiteralFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAdaptLiteralFunction · 0.68