mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 03:27:02 -07:00
Added more API documentation and minor changes
This commit is contained in:
parent
cd840b2bf0
commit
1d862ebd8c
15 changed files with 117 additions and 48 deletions
|
|
@ -23,7 +23,7 @@ func (g *DnsMasq) GetDescription() string {
|
|||
return fmt.Sprintf("Configurator generator plugin for '%s'.", g.GetName())
|
||||
}
|
||||
|
||||
func (g *DnsMasq) Generate(config *configurator.Config, opts ...util.Option) (generator.Files, error) {
|
||||
func (g *DnsMasq) Generate(config *configurator.Config, opts ...util.Option) (generator.FileMap, error) {
|
||||
// make sure we have a valid config first
|
||||
if config == nil {
|
||||
return nil, fmt.Errorf("invalid config (config is nil)")
|
||||
|
|
@ -74,7 +74,7 @@ func (g *DnsMasq) Generate(config *configurator.Config, opts ...util.Option) (ge
|
|||
output += "# ====================================================================="
|
||||
|
||||
// apply template substitutions and return output as byte array
|
||||
return generator.ApplyTemplates(generator.Mappings{
|
||||
return generator.ApplyTemplateFromFiles(generator.Mappings{
|
||||
"plugin_name": g.GetName(),
|
||||
"plugin_version": g.GetVersion(),
|
||||
"plugin_description": g.GetDescription(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue