(config *conf.Config)
| 158 | } |
| 159 | |
| 160 | func (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 | |
| 176 | func clearSlice[S ~[]E, E any](s S) { |
| 177 | var zero E |
no test coverage detected