Go calling C functions from statically linked library adapted from https://www.ardanlabs.com/blog/2013/08/using-c-dynamic-libraries-in-go-programs.html