Skip to content
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

Please use uptodated 'Masterminds/sprig' #26

Open
n-arakawa opened this issue Jul 27, 2020 · 3 comments
Open

Please use uptodated 'Masterminds/sprig' #26

n-arakawa opened this issue Jul 27, 2020 · 3 comments

Comments

@n-arakawa
Copy link

n-arakawa commented Jul 27, 2020

version info: frep-1.3.10-linux-amd64

According to git.mod, frep now uses 'Masterminds/sprig' of V2.22.

github.com/Masterminds/sprig v2.22.0+incompatible

I hope to have a 'get' dict function which is available from V3 of 'Masterminds/sprig'.

I always use frep with '--missing error'.
With 'get', I can say somthing like

{{ if eq (get . "optional_value") "ON" }}

instead of

{{ if hasKey . "optional_value" }} {{ if eq .optional_value "ON" }}

@subchen
Copy link
Owner

subchen commented Jul 28, 2020

I will upgrade to sprig V3 for next major version.

@n-arakawa
Copy link
Author

n-arakawa commented Dec 14, 2020

This idiom seems to work with --missing error --strict

{{ append (pluck "optional_value" .) "UNDEF" | first }}

@kiorky
Copy link
Contributor

kiorky commented Aug 4, 2021

what's the ETA, having get would be so great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants