Replying to a very old thread here, but

  https://github.com/go-sprout/sprout

is the future.

On Monday, May 20, 2024 at 11:45:02 AM UTC+2 [email protected] wrote:

> Just following up on this old message, there now seems to be at least:
>
> https://github.com/go-sprout/sprout
> https://github.com/chezmoi/templatefuncs
>
> Regards,
> Tom
>
> On Monday, January 9, 2023 at 8:53:41 PM UTC+1 Tom Payne wrote:
>
>> github.com/Masterminds/sprig is a popular library of template functions, 
>> used by some popular projects, e.g. Kubernetes Helm.
>>
>> Unfortunately, Masterminds/sprig also has a number of inherent flaws:
>> 1. The order of arguments to many of its functions is incompatible with 
>> text/template's pipeline syntax.
>> 2. Many of its functions do not handle strings, []bytes, variable numbers 
>> of arguments, and other argument variations in a sensible way.
>> 3. It has, at the time of writing, 78 open issues 
>> <https://github.com/Masterminds/sprig/issues>, most of them unaddressed, 
>> and has seen only minor maintenance activity over the last few years.
>> 4. Its function names do not follow Go's naming conventions.
>>
>> #1 and #2 cannot be fixed in a backwards-compatible way. #3 means that 
>> fixes aren't practically accepted anyway. #4 just means that templates 
>> using Masterminds/sprig are ugly to Go developer eyes.
>>
>> Instead, I want a library of template functions that works well with 
>> text/template, has decent ergonomics, follows Go's naming conventions, and 
>> is actively maintained. I don't care about backwards compatibility with 
>> sprig as this is impossible to achieve anyway.
>>
>> Before I start such a project, are there any existing good existing 
>> alternatives to Masterminds/sprig?
>>
>> Many thanks,
>> Tom
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/2cccc926-bdd9-43b5-82fe-44bf7b64c4ban%40googlegroups.com.

Reply via email to