✨ Config.AddOptions and Generator.MakeWithConfig
This commit is contained in:
parent
d7b14f804c
commit
1abfaa44d1
3 changed files with 25 additions and 3 deletions
|
|
@ -21,3 +21,11 @@ func NewConfig(options ...Option) Config {
|
|||
}
|
||||
return conf
|
||||
}
|
||||
|
||||
// AddOptions creates a new Config with options added.
|
||||
func (c Config) AddOptions(options ...Option) Config {
|
||||
for _, opt := range options {
|
||||
opt(&c)
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue