How can golang use library functions written in other languages?
You can show some elementary example of a function in C; C ++; C # where the function would return a value of the "Hello World" type, and I would see this value in the program on golang?

    1 answer 1

    Good day. I can only answer for C. Part of the distribution to is CGo. I mean, everything in C can be imported into Go code. In this regard, there is a good article on how to do it all https://www.goinggo.net/2013/08/using-c-dynamic-libraries-in-go-programs.html

    From my own experience I can say that the task is not easy (I tried to write extensions for Python on CGo). But if you believe the documentation for Go 1.5 (or newer), then everything that is going into * .o and is completed with the corresponding * .h file can be imported into Go.

    Regarding other CUs like C # and C ++ are not up to date and have not tried