In this entry, I try to introduce how to use FFI (Foreign Function Interface) of Go. I choosed to write the wrapper for TokyoCabinet, a database library. To call C and C++ code from go, you need to use cgo command. And the simple example is contained in go distribution ($GOROOT/misc/cgo/stdio and $GOROOT/misc/cgo/gmp). cgo commands converts *.go files into *.c and *.go files. Then compiles them an