diff --git a/README.md b/README.md index 4403f8c..02c7be8 100644 --- a/README.md +++ b/README.md @@ -142,14 +142,14 @@ func (g *MyGenerator) Generate(config *configurator.Config, opts ...util.Option) if client { eths, err := client.FetchEthernetInterfaces(opts...) // ... blah, blah, blah, check error, format output, and so on... - } + // apply the substitutions to Jinja template and return output as FileMap (i.e. path and it's contents) return generator.ApplyTemplate(path, generator.Mappings{ "plugin_name": g.GetName(), "plugin_version": g.GetVersion(), "plugin_description": g.GetDescription(), - "output": output, + "dhcp_hosts": output, }) } diff --git a/pkg/generator/dnsmasq.go b/pkg/generator/dnsmasq.go index 4ce5b8f..8db68ba 100644 --- a/pkg/generator/dnsmasq.go +++ b/pkg/generator/dnsmasq.go @@ -66,6 +66,6 @@ func (g *DNSMasq) Generate(config *config.Config, params Params) (FileMap, error "plugin_name": g.GetName(), "plugin_version": g.GetVersion(), "plugin_description": g.GetDescription(), - "output": output, + "dhcp_hosts": output, }, params.Templates) }