Go and Ruby-FFI

How to write a shared library in Go that can be loaded by Ruby-FFI.