kelseyhightower/confd — pull request #40 by gabrtv (2014-01-22 01:31:46+00:00)
Title: Add directory value and path.Base for complex iteration

There is currently no way to iterate over directories during template processing. This PR aims to change that (though a work in progress).

By adding `node.Nodes` as the directory value during the `nodeWalk`, we can perform range operations that make the following template possible:

```
{{ range $user := .deis_builder_users }}{{ range $key := $user.Nodes }}
command="/app/gitreceive run {{ Base $user.Key }} {{ Base $key.Key }}",no-agent-forwarding,no-pty,no-user-rc,no-X11-forwarding,no-port-forwarding {{ $key.Value }}
{{ end }}{{ end }}
```