github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/lib/base/lua/rawget.lua (about)

     1  print(rawget({x=1}, "x"))
     2  --> =1
     3  
     4  print(rawget({"hello"}, 1.0))
     5  --> =hello
     6  
     7  print(rawget({}, "abc"))
     8  --> =nil
     9  
    10  print(pcall(rawget, "hello", 1))
    11  --> ~^false\t.*#1 must be a table
    12  
    13  print(pcall(rawget, {}))
    14  --> ~^false\t