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

Add missingkey config option and/or mandatory function #10023

Open
mcexit opened this issue Jun 16, 2022 · 0 comments
Open

Add missingkey config option and/or mandatory function #10023

mcexit opened this issue Jun 16, 2022 · 0 comments
Labels
Milestone

Comments

@mcexit
Copy link

mcexit commented Jun 16, 2022

I'm not sure if this is potentially a bug because I thought at one point the default was if you tried using a variable or param in a template that wasn't set without using an if statement, that it would error out. Now I just get empty values.

I understand that some people may want empty values, so I'm not going to argue what should be default. I'd really like the choice though to enforce non-empty values else error. I understand that I can check if something isn't set and use errorf but that is incredibly verbose (clogging up templates), prone to being overlooked and requires duplicative debugging.

Another request for when you don't want to change this setting site-wide would be to have a mandatory function. Basically, use case would be something like {{ .Description | mandatory }} or {{ mandatory .Keywords }}.

@bep bep removed the NeedsTriage label Jun 17, 2022
@bep bep added this to the v0.102.0 milestone Jun 17, 2022
@bep bep modified the milestones: v0.102.0, v0.103.0 Aug 28, 2022
@bep bep modified the milestones: v0.103.0, v0.104.0 Sep 15, 2022
@bep bep modified the milestones: v0.104.0, v0.105.0 Sep 23, 2022
@bep bep modified the milestones: v0.105.0, v0.106.0 Oct 26, 2022
@bep bep modified the milestones: v0.106.0, v0.107.0 Nov 18, 2022
@bep bep modified the milestones: v0.107.0, v0.108.0 Dec 3, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@bep bep removed this from the v0.113.0 milestone Jun 13, 2023
@bep bep added this to the v0.115.0 milestone Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 5, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants