refactor: more implementation to refactor and deleted files
This commit is contained in:
parent
ba684bd149
commit
50e6b53091
17 changed files with 84 additions and 945 deletions
|
|
@ -1,23 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.towk2.me/towk/configurator/pkg/config"
|
||||
"git.towk2.me/towk/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.ApplyTemplates(generator.Mappings{
|
||||
"plugin_name": g.GetName(),
|
||||
"plugin_version": g.GetVersion(),
|
||||
"plugin_description": g.GetDescription(),
|
||||
}, params.Templates)
|
||||
}
|
||||
|
||||
var Generator TestGenerator
|
||||
Loading…
Add table
Add a link
Reference in a new issue