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

Function findFile

load.go:32–39  ·  view source on GitHub ↗
(l *State, name, field, dirSep string)

Source from the content-addressed store, hash-verified

30}
31
32func findFile(l *State, name, field, dirSep string) (string, error) {
33 l.Field(UpValueIndex(1), field)
34 path, ok := l.ToString(-1)
35 if !ok {
36 Errorf(l, "'package.%s' must be a string", field)
37 }
38 return searchPath(l, name, path, ".", dirSep)
39}
40
41func checkLoad(l *State, loaded bool, fileName string) int {
42 if loaded { // Module loaded successfully?

Callers 1

searcherLuaFunction · 0.85

Calls 5

UpValueIndexFunction · 0.85
ErrorfFunction · 0.85
searchPathFunction · 0.85
FieldMethod · 0.80
ToStringMethod · 0.80

Tested by

no test coverage detected