MCPcopy Index your code
hub / github.com/Shopify/go-lua / arrayIndex

Function arrayIndex

tables.go:215–222  ·  view source on GitHub ↗
(k value)

Source from the content-addressed store, hash-verified

213}
214
215func arrayIndex(k value) int {
216 if n, ok := k.(float64); ok {
217 if i := int(n); float64(i) == n {
218 return i
219 }
220 }
221 return -1
222}
223
224func (l *State) next(t *table, key int) bool {
225 i, k := 0, l.stack[key]

Callers 1

nextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…