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

Function searcherPreload

load.go:61–69  ·  view source on GitHub ↗
(l *State)

Source from the content-addressed store, hash-verified

59}
60
61func searcherPreload(l *State) int {
62 name := CheckString(l, 1)
63 l.Field(RegistryIndex, "_PRELOAD")
64 l.Field(-1, name)
65 if l.IsNil(-1) {
66 l.PushString(fmt.Sprintf("\n\tno field package.preload['%s']", name))
67 }
68 return 1
69}
70
71func createSearchersTable(l *State) {
72 searchers := []Function{searcherPreload, searcherLua}

Callers

nothing calls this directly

Calls 4

CheckStringFunction · 0.85
FieldMethod · 0.80
IsNilMethod · 0.80
PushStringMethod · 0.80

Tested by

no test coverage detected