3 ms·
Oh man, dynamic loading of Go libraries is going to be awesome. I'm in the process of developing an http API framework/server (yes, yet another one, but why is
by dvirsky 11y ago
Oh man, dynamic loading of Go libraries is going to be awesome. I'm in the process of developing an http API framework/server (yes, yet another one, but why is a different topic). This will allow me to compile the actual APIs running on the server (multiple APIs can run on one server) as shared libraries and have the server automatically start them.
- abetusk 11y agoAs far as I know there is still no easy facility to dynamically load libraries at runtime (like the analogous 'dlopen' in C). There are shared libraries and they can be linked at compile time so it's a step in the right direction.
- dvirsky 11y agoThe spec that's linked from the presentation says that it should be possible (and has an example API usage). Unless they didn't implement it fully, of course, or it's due for a later Go version. > to support Go packages that want to use plugins, a new package will be added to the standard library: plugin. It will define a function and a type. https://docs.google.com/document/d/1nr-TQHw_er6GOQRsF6T43GGhFDelrAP0NqSS_00RgZQ/edit?pli=1 https://docs.google.com/document/d/1nr-TQHw_er6GOQRsF6T43GGh... [EDIT] I looked at the commits and it looks like it's not in the works, at least on the main repo.