mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 11:37:00 -07:00
Updated README.md
This commit is contained in:
parent
fad5dcb8a9
commit
2a2185ded0
1 changed files with 2 additions and 6 deletions
|
|
@ -71,11 +71,7 @@ func (g *MyGenerator) GetName() string {
|
||||||
return "my-generator"
|
return "my-generator"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *MyGenerator) GetGroups() []string {
|
func (g *MyGenerator) Generate(config *configurator.Config, opts ...util.Option) (map[string][]byte, error) {
|
||||||
return []string{ "my-generator" }
|
|
||||||
}
|
|
||||||
|
|
||||||
func (g *MyGenerator) Generate(config *configurator.Config, opts ...util.Option) ([]byte, error) {
|
|
||||||
// do config generation stuff here...
|
// do config generation stuff here...
|
||||||
var (
|
var (
|
||||||
params = generator.GetParams(opts...)
|
params = generator.GetParams(opts...)
|
||||||
|
|
@ -103,7 +99,7 @@ Finally, build the plugin and put it somewhere specified by `plugins` in your co
|
||||||
go build -buildmode=plugin -o lib/mygenerator.so path/to/mygenerator.go
|
go build -buildmode=plugin -o lib/mygenerator.so path/to/mygenerator.go
|
||||||
```
|
```
|
||||||
|
|
||||||
Now your plugin should be available to use with the `configurator` main driver.
|
Now your plugin should be available to use with the `configurator` main driver. If you get an error about not loading the correct symbol type, make sure that you generator function definitions match the `Generator` interface exactly.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue