-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Backfill Sprig functions in Liquid templating #34
feat: Backfill Sprig functions in Liquid templating #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ones I reimplemented was for a reason but i don't fully remember. I think it's because pipes in liquid are inverted versus in go template (first vs last arg).
@michaeljguarino PTAL |
template/liquid.go
Outdated
} | ||
|
||
for name, fnc := range fncs { | ||
if algorithms.Index(excludedFunctions, func(s string) bool { return s == name }) < 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a function in github.com/samber/lo
for this, I think it's lo.Has
Use whole set of Sprig functions and keep old name mappings for backwards compatibility.