Skip to content

Commit

Permalink
template: rename parent to dir, and drop sibling
Browse files Browse the repository at this point in the history
  • Loading branch information
kelseyhightower committed Oct 11, 2014
1 parent b05600f commit f5f71d4
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,12 @@ Returns all subkeys, []string, where path matches its argument. It only returns
{{end}}
```

### sibling

Returns the sibling element following the same base path but with the second argument as key.
```
{{with sibling "/services/data/url" "user"}}
key: {{.Key}}
value: {{.Value}}
{{end}}
```

### parent
### dir

Returns the parent directory of a given key.
```
{{with parent "/services/data/url"}}
parent: {{.}}
{{with dir "/services/data/url"}}
dir: {{.}}
{{end}}
```

Expand Down

0 comments on commit f5f71d4

Please sign in to comment.