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

validating that a value is set #103

Open
ebertech opened this issue Dec 29, 2017 · 2 comments
Open

validating that a value is set #103

ebertech opened this issue Dec 29, 2017 · 2 comments

Comments

@ebertech
Copy link

I may be missing something obvious, but is there a way to error out if a variable substitution is blank?

I guess there's two approaches:

  1. inside the body of a predicate. seems simple enough though is probably verbose.
  2. if there is even one unfulfilled replacement, then error out.

I think this:
https://golang.org/pkg/text/template/#Template.Option
handles option 2 but would require a change in the dockerize args parsing and template handling.

@jwilder
Copy link
Owner

jwilder commented Mar 17, 2018

No way to do this currently. #93 might handle this though.

@rlopezro
Copy link

@jwilder It would be really helpful if #93 was merged and released. Right now I need extra code to check if certain env variables are set. This is the last thing I need to completely replace envtpl with dockerize and remove the python dependency.

Repository owner deleted a comment from powerman Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants