IsGoFunction verifies that the value at index is a Go function. http://www.lua.org/manual/5.2/manual.html#lua_iscfunction
(index int)
| 670 | // |
| 671 | // http://www.lua.org/manual/5.2/manual.html#lua_iscfunction |
| 672 | func (l *State) IsGoFunction(index int) bool { |
| 673 | if _, ok := l.indexToValue(index).(*goFunction); ok { |
| 674 | return true |
| 675 | } |
| 676 | _, ok := l.indexToValue(index).(*goClosure) |
| 677 | return ok |
| 678 | } |
| 679 | |
| 680 | // IsNumber verifies that the value at index is a number. |
| 681 | // |