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

Function newIDGenerator

cel/optimizer.go:210–215  ·  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

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

Callers 2

OptimizeMethod · 0.85
CopyASTMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected