text/template: consider broadening the set of built-in template funcs #15007
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Some programs expect their users to write templates. One of these programs is
docker-gen
, and one of its users filed issue #14992 as they found the template language too restrictive for what they were trying to do.As it happened,
docker-gen
provided the a template function to let the user do what they wanted (filter a set of structs based on the value of a field, and print something different if no structs with that field set to that specific value are found). That function is documented by thedocker-gen
README:The
docker-gen
program provides many such functions (see the README for the full list). Some of them are specific todocker-gen
's purpose, but many of them are general purpose (such aswhere
above).Should we add some of these functions (or functions with similar behavior) to the built in set of template functions?
cc @robpike @bradfitz @Jonast
The text was updated successfully, but these errors were encountered: