nomino/config.go

24 lines
399 B
Go
Raw Permalink Normal View History

2025-03-10 14:52:50 -05:00
package nomino
type Config struct {
original string
prefix string
suffix string
extension string
2025-03-11 16:42:39 -05:00
separator string
2025-03-10 14:52:50 -05:00
generator Generator
}
2025-03-15 15:35:40 -05:00
// NewConfig returns a new Config with the specified Options.
2025-03-10 14:52:50 -05:00
func NewConfig(options ...Option) Config {
conf := Config{
extension: ".txt",
2025-03-11 16:42:39 -05:00
separator: "_",
2025-03-10 14:52:50 -05:00
generator: uuidGen,
}
for _, opt := range options {
opt(&conf)
}
return conf
}