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

Function checkLoad

load.go:41–50  ·  view source on GitHub ↗
(l *State, loaded bool, fileName string)

Source from the content-addressed store, hash-verified

39}
40
41func checkLoad(l *State, loaded bool, fileName string) int {
42 if loaded { // Module loaded successfully?
43 l.PushString(fileName) // Second argument to module.
44 return 2 // Return open function & file name.
45 }
46 m := CheckString(l, 1)
47 e := CheckString(l, -1)
48 Errorf(l, "error loading module '%s' from file '%s':\n\t%s", m, fileName, e)
49 panic("unreachable")
50}
51
52func searcherLua(l *State) int {
53 name := CheckString(l, 1)

Callers 1

searcherLuaFunction · 0.85

Calls 3

CheckStringFunction · 0.85
ErrorfFunction · 0.85
PushStringMethod · 0.80

Tested by

no test coverage detected