Config.AddOptions and Generator.MakeWithConfig

This commit is contained in:
Dan Jones 2025-03-18 09:22:30 -05:00
commit 1abfaa44d1
3 changed files with 25 additions and 3 deletions

View file

@ -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
}