ToBoolean converts the Lua value at index to a Go boolean. Like all tests in Lua, the only false values are false booleans and nil. Otherwise, all other Lua values evaluate to true. To accept only actual boolean values, use the test IsBoolean. http://www.lua.org/manual/5.2/manual.html#lua_toboolea
(index int)
| 1409 | // |
| 1410 | // http://www.lua.org/manual/5.2/manual.html#lua_toboolean |
| 1411 | func (l *State) ToBoolean(index int) bool { return !isFalse(l.indexToValue(index)) } |
| 1412 | |
| 1413 | // Table pushes onto the stack the value table[top], where table is the |
| 1414 | // value at index, and top is the value at the top of the stack. This |