github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/lib/base/getmetatable.go (about) 1 package base 2 3 import ( 4 rt "github.com/arnodel/golua/runtime" 5 ) 6 7 func getmetatable(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { 8 if err := c.Check1Arg(); err != nil { 9 return nil, err 10 } 11 return c.PushingNext(t.Runtime, t.Metatable(c.Arg(0))), nil 12 }