Dave Cunningham

Results 152 comments of Dave Cunningham
trafficstars

You can do `{k: obj[k]*2 for k in std.objectFields(obj)}` Iteration over objects would be nice too `{k: e for k, v in ...}` And it's just syntax sugar to implement...

The issue is about matching the python feature of for k, v in obj, which I think would be useful even though a simple work around is to loop over...

Your example looks fine to me. It's a bit weird to have the docker object be a step as well as having other templates in it, but it does work....

How about this: ``` { base:: { local plugin = self, name: 'docker', image: 'plugins/docker', repo:: 'foo/bar', settings: { repo: plugin.repo, }, } // Of course there can be other...

If someone wants to add the ability to do :: in an object comprehension then please send a PR (go-jsonnet only is fine) Ditto for +: and +:: (neither of...

When you're using multi to output files that are not json (e.g. yaml), you have to choose a format for each file being output. In practice that means using std.exportYamlDoc...

You might have better luck depending on this instead: https://pypi.org/project/gojsonnet/ It will still need compiling but as it's based on the Go version of Jsonnet the only C code needed...

I only just noticed this. It seems like it could be useful for a fair few cases but it's a bit too big for the release I'm just doing.

It'd be worth trying to move the following sets out of the function so they don't get generated each time: ``` local letters = std.set(std.stringChars('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-/')); local digits = std.set(std.stringChars('0123456789')); local...