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

Ability to add keys to dict variable #23

Closed
sbezverk opened this issue Nov 30, 2016 · 2 comments
Closed

Ability to add keys to dict variable #23

sbezverk opened this issue Nov 30, 2016 · 2 comments

Comments

@sbezverk
Copy link

Currently there is no way to add any key to already instantiated variable. It makes building large dictionaries difficult, as all key needs to be specified within a single {{ with }} command.
It would be great to be able to build dict variable by adding 1 key at the time.

example:
{{ $env := dict "blah-1" $blah-1 }}
{{ $env := dict "blah-2" $blah-2 }}
resulting $env having two pairs of keys.

@kfox1111
Copy link

+1.

maybe something like
{{ $env := dict "blah-1" $blah-1 }}
{{ $env := dict-update $env "blah-2" $blah-2 }}

@technosophos
Copy link
Member

Oops... forgot to close this back when we added set

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