(opts *lua.LTable, key string)
| 185 | } |
| 186 | |
| 187 | func luaGetOptsArray(opts *lua.LTable, key string) []string { |
| 188 | actions := []string{} |
| 189 | val := opts.RawGetString(key) |
| 190 | if v, ok := val.(*lua.LTable); ok { |
| 191 | v.ForEach(func(idx, value lua.LValue) { |
| 192 | actions = append(actions, value.String()) |
| 193 | }) |
| 194 | } |
| 195 | return actions |
| 196 | } |
| 197 | |
| 198 | func luaContextGetToken(l *lua.LState) int { |
| 199 | ctx := luaCheckContext(l) |