gossh
gossh copied to clipboard
Add plugin support
Hey,
So here is the PR to add plugin support. I created a folder called recipes and store different states there. To use them in the code:
-
go to one of the recipe directories and run
go build -buildmode=plugin
. This will create a .so file with the directory name. (mysql.so or tree.so) -
Gossh has a flag now for the recipeName.
./gossh -recipeName recipes/tree/tree.so
, will install that plugin to the program and print it. -
You can distribute
.so
files independently from the code (put not from OS) and just put them near your binary.
Feel free to ignore the PR, it's just an exploration around your code with respect to #1
That looks really powerful! Your PR gives me an instant feel for what plugins could do for gossh. Thanks for taking the time to do this!
It also looks like something that - at the time being - is a bit overkill. I'll leave this PR hanging as inspiration for a while, then I'll circle back to it and update :)