dockerize
dockerize copied to clipboard
validating that a value is set
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:
- inside the body of a predicate. seems simple enough though is probably verbose.
- 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.
No way to do this currently. #93 might handle this though.
@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.