Best way to run the tool programmatically via Go?
I would like to import Diun's code into a separate Go project, and run the service programmatically within my program. I imagine this allows for a deeper integration, having direct access to the tool's resources. I'm planning on wrapping Diun into a Mattermost server-side plugin, which is a process running Go code. I'd like to package the integration this way, so the Diun server can be hosted automatically by the admin installing the plugin to their server.
How might I go about integrating directly with Diun's code? It looks like cmd/serve.go is a good starting point to understand how to integrate, and is possibly the existing entrypoint (or its contents) needed to reach into Diun's functionality. Is there a more appropriate way to integrate directly with the source code?
Don't think you can atm as much of the logic is in the internal package and therefore not exposed.