From cd40fd194fe53aa9e7b0c83cbd88f78de5595764 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Tue, 7 Jan 2025 12:54:45 -0700 Subject: [PATCH] examples: fixed illegal character in dnsmasq template --- examples/plugin/test.go | 19 +++++++++++++++++++ examples/templates/dnsmasq.jinja | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 examples/plugin/test.go diff --git a/examples/plugin/test.go b/examples/plugin/test.go new file mode 100644 index 0000000..f1b4e9b --- /dev/null +++ b/examples/plugin/test.go @@ -0,0 +1,19 @@ +package main + +import ( + "github.com/OpenCHAMI/configurator/pkg/config" + "github.com/OpenCHAMI/configurator/pkg/generator" +) + +type TestGenerator struct{} + +func (g *TestGenerator) GetName() string { return "test" } +func (g *TestGenerator) GetVersion() string { return "v1.0.0" } +func (g *TestGenerator) GetDescription() string { + return "This is a plugin creating for running tests." +} +func (g *TestGenerator) Generate(config *config.Config, params generator.Params) (generator.FileMap, error) { + return generator.FileMap{"test": []byte("test")}, nil +} + +var Generator TestGenerator diff --git a/examples/templates/dnsmasq.jinja b/examples/templates/dnsmasq.jinja index c522039..d187a9a 100644 --- a/examples/templates/dnsmasq.jinja +++ b/examples/templates/dnsmasq.jinja @@ -7,4 +7,4 @@ # Source code: https://github.com/OpenCHAMI/configurator # Creating plugins: https://github.com/OpenCHAMI/configurator/blob/main/README.md#creating-generator-plugins # -{{ dhcp-hosts }} +{{ dhcp_hosts }}