Custom Go func plugins to provide go-task plugin capability or easy extensionsibility #486
sheldonhull
started this conversation in
General
Replies: 1 comment 1 reply
-
@andreynering any tips? If it's possible already using the library directly can I use this in a similar fashion to Mage? I love the quick iteration with Task but want to write some reusable functions that handle logging say with Pterm, logic checks and other Go helper functions, while still leveraging the simplicity of Task if I can. I've been using a combination of Goyek similar to Mage) and Task and am interested in capability to build more resumable Go helpers for Task |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I really like Go task for quickly setting up some projects with a simple execution of go, docker commands and more.
Once I get beyond basics though it's hard to use in comparison to what I've used in the past.
I've got a background with PowerShell, which in this context is very robust and allows custom functions and very rich object interactions and pipelines. I know that PowerShell 7 (cross platform) doesn't fit in the model for this app, as it uses the
sh
package to do cross platform execution. However, it's bit difficult for me to start adding helpers like custom host colored output, argument builder for more complex app, etc.I also have used Mage, goyek, and others.
I'm wondering if there could be a compromise in the simplicity of a yaml file for a task while still supporting some custom functions that could be very simple Go based functions as a "plugin". For example, I could include a
go-task.go
file that would use Pterm to provide nice console output or progress bars and then this plugin could be used bygo-task
like:It's a thought. If I could extend my tasks to do specific things without effort then I could simplify my task writing, and bind it together with cmd itself.
Beta Was this translation helpful? Give feedback.
All reactions