I am looking to convert part of an app I have written in golang to a dll/dylib/so and make calls to it from my core golang app.

Does anyone know of any good resources or guides on how to do this as my searches are not turning up a great deal of info (much of what I'm finding are old requests for the feature which i understand is now included)

Please note: I have seen documentation on how to do the actual build, it is more around how to organise the app and expose methods that I am missing

I would also be interested in pros/cons of this approach if anyone has any experience doing something similar