gossh icon indicating copy to clipboard operation
gossh copied to clipboard

Add plugin support

Open atakanyenel opened this issue 4 years ago • 1 comments

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

atakanyenel avatar Mar 27 '20 20:03 atakanyenel

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 :)

krilor avatar Mar 28 '20 07:03 krilor