return fmt.Errorf("%s: invalid %v", path, err)
}
err = tmpl.Execute(&buf, &templateArgs{
- Host: host,
- Hostname: strings.Split(host, ".")[0],
- groups: groupsMap,
- allHosts: allHostsMap,
- allGroups: allGroupsMap,
+ Host: host,
+ Hostname: strings.Split(host, ".")[0],
+ groups: groupsMap,
+ allHosts: allHostsMap,
+ allGroups: allGroupsMap,
allGroupHosts: allGroups,
})
if err != nil {
// templateArgs is passed to .Execute() of the template.
type templateArgs struct {
- Host string
- Hostname string
- groups map[string]bool
- allHosts map[string]bool
- allGroups map[string]bool
+ Host string
+ Hostname string
+ groups map[string]bool
+ allHosts map[string]bool
+ allGroups map[string]bool
allGroupHosts map[string][]string
}