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

Function functionName

auxiliary.go:11–26  ·  view source on GitHub ↗
(l *State, d Debug)

Source from the content-addressed store, hash-verified

9)
10
11func functionName(l *State, d Debug) string {
12 switch {
13 case d.NameKind != "":
14 return fmt.Sprintf("function '%s'", d.Name)
15 case d.What == "main":
16 return "main chunk"
17 case d.What == "Go":
18 if pushGlobalFunctionName(l, d.callInfo) {
19 s, _ := l.ToString(-1)
20 l.Pop(1)
21 return fmt.Sprintf("function '%s'", s)
22 }
23 return "?"
24 }
25 return fmt.Sprintf("function <%s:%d>", d.ShortSource, d.LineDefined)
26}
27
28func countLevels(l *State) int {
29 li, le := 1, 1

Callers 1

TracebackFunction · 0.85

Calls 3

pushGlobalFunctionNameFunction · 0.85
ToStringMethod · 0.80
PopMethod · 0.80

Tested by

no test coverage detected