You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see the go-task documentation expanded because currently it is very difficult to understand how to use go-task unless you have a go background.
From the documentation I am getting the impression that go-task should be a generic task runner / build tool and not a tool specific to go programmers. This impression comes from the fact that it is presented as a simpler and easier to use replacement for GNU Make and similar software.
However, it is currently very difficult to understand what can and cannot go within {{ }}. Specifically the page at https://golang.org/pkg/text/template/ that is linked in the documentation is not really easy to follow by those without a go programming background.
For instance: if I have a glob pattern, how do I put into a variable its expansion? If I have an array variable, can I flatten it into a string to pass it to the shell? Complex as it is, the GNU Make manual has an extended section about variables and functions applicable to them and it would be nice to have at least some more examples about how to use functions on variables in go-task.
Thanks for the attention.
The text was updated successfully, but these errors were encountered:
Hey @callegar. Funny that you mention this now. The next version of our docs will come with a Templating Reference page. You can view a preview of this here: https://taskfile.dev/next/reference/templating. This is only meant to provide a high-level overview of the functionality available in the templating engine and the variables/functions available, but it should be more than enough for most users.
Please let us know if you think there's anything missing here and we can make a decision as to whether more information needs adding.
I have given just a quick peek at it, seems exactly what I was looking for! There are just minor things that maybe could be expanded:
I understand that current go-task supports variable of any type, not just strings but also maps and arrays. Examples on how to convert from non-string types to a single string and viceversa might be useful (e.g. split a string into an array, flatten an array into a string with delimiters and a joiner (this may be particularly useful to pass things to commands).
Examples on how to manage pathnames with spaces that are stored in string variables or array variables when passing them to commands.
Examples on file patterns and how to expand them into (array) variables.
I would like to see the go-task documentation expanded because currently it is very difficult to understand how to use go-task unless you have a go background.
From the documentation I am getting the impression that go-task should be a generic task runner / build tool and not a tool specific to go programmers. This impression comes from the fact that it is presented as a simpler and easier to use replacement for GNU Make and similar software.
However, it is currently very difficult to understand what can and cannot go within
{{ }}
. Specifically the page at https://golang.org/pkg/text/template/ that is linked in the documentation is not really easy to follow by those without a go programming background.For instance: if I have a glob pattern, how do I put into a variable its expansion? If I have an array variable, can I flatten it into a string to pass it to the shell? Complex as it is, the GNU Make manual has an extended section about variables and functions applicable to them and it would be nice to have at least some more examples about how to use functions on variables in go-task.
Thanks for the attention.
The text was updated successfully, but these errors were encountered: