MCPcopy Index your code
hub / github.com/expr-lang/expr / reset

Method reset

checker/checker.go:160–174  ·  view source on GitHub ↗
(config *conf.Config)

Source from the content-addressed store, hash-verified

158}
159
160func (v *Checker) reset(config *conf.Config) {
161 if v.needsReset {
162 clearSlice(v.predicateScopes)
163 clearSlice(v.varScopes)
164 v.predicateScopes = v.predicateScopes[:0]
165 v.varScopes = v.varScopes[:0]
166 v.err = nil
167 }
168 v.needsReset = true
169
170 if config == nil {
171 config = conf.New(nil)
172 }
173 v.config = config
174}
175
176func clearSlice[S ~[]E, E any](s S) {
177 var zero E

Callers 2

PatchAndCheckMethod · 0.95
CheckMethod · 0.95

Implementers 3

Configconf/config.go
Checkerchecker/checker.go
OperatorOverloadingpatcher/operator_override.go

Calls 2

NewFunction · 0.92
clearSliceFunction · 0.70

Tested by

no test coverage detected