MCPcopy Create free account
hub / github.com/expr-lang/expr / Item

Method Item

vm/utils.go:31–45  ·  view source on GitHub ↗

Item returns the current element from the scope using fast paths when available.

()

Source from the content-addressed store, hash-verified

29
30// Item returns the current element from the scope using fast paths when available.
31func (s *Scope) Item() any {
32 if s.Ints != nil {
33 return s.Ints[s.Index]
34 }
35 if s.Floats != nil {
36 return s.Floats[s.Index]
37 }
38 if s.Strings != nil {
39 return s.Strings[s.Index]
40 }
41 if s.Anys != nil {
42 return s.Anys[s.Index]
43 }
44 return s.Array.Index(s.Index).Interface()
45}
46
47type groupBy = map[any][]any
48

Callers 1

RunMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected