ToGoFunction converts a value at index into a Go function. That value must be a Go function, otherwise it returns nil. http://www.lua.org/manual/5.2/manual.html#lua_tocfunction
(index int)
| 827 | // |
| 828 | // http://www.lua.org/manual/5.2/manual.html#lua_tocfunction |
| 829 | func (l *State) ToGoFunction(index int) Function { |
| 830 | switch v := l.indexToValue(index).(type) { |
| 831 | case *goFunction: |
| 832 | return v.Function |
| 833 | case *goClosure: |
| 834 | return v.function |
| 835 | } |
| 836 | return nil |
| 837 | } |
| 838 | |
| 839 | // ToUserData returns an interface{} of the userdata of the value at index. |
| 840 | // Otherwise, it returns nil. |
nothing calls this directly
no test coverage detected