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

Function clearSlice

vm/vm.go:786–791  ·  view source on GitHub ↗
(s S)

Source from the content-addressed store, hash-verified

784}
785
786func clearSlice[S ~[]E, E any](s S) {
787 var zero E
788 for i := range s {
789 s[i] = zero // clear mem, optimized by the compiler, in Go 1.21 the "clear" builtin can be used
790 }
791}
792
793// estimateFnArgsCount inspects a *Program and estimates how many function
794// arguments will be required to run it.

Callers 1

RunMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…