This is a POC of using a C-shared library (created from Go) in another Go program. It's composed of 3 files:
lib.goThe librarymain.goThe main Go program leveraging the C-shared libraryMakefileFor easy running and building. Callmake runto run and build.
If you'd like to try this in Docker:
docker run --rm -w /work -v $PWD:/work golang make run