examples: updated test plugin

This commit is contained in:
David Allen 2025-01-07 12:57:29 -07:00
parent cd40fd194f
commit 733c486cb2
Signed by: towk
GPG key ID: 793B2924A49B3A3F

View file

@ -13,7 +13,11 @@ 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
return generator.ApplyTemplates(generator.Mappings{
"plugin_name": g.GetName(),
"plugin_version": g.GetVersion(),
"plugin_description": g.GetDescription(),
}, params.Templates)
}
var Generator TestGenerator