(l *State, loaded bool, fileName string)
| 39 | } |
| 40 | |
| 41 | func 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 | |
| 52 | func searcherLua(l *State) int { |
| 53 | name := CheckString(l, 1) |
no test coverage detected