♻️ Export Config
This commit is contained in:
parent
5c4e66d144
commit
7bd5503613
6 changed files with 56 additions and 38 deletions
20
config.go
Normal file
20
config.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package nomino
|
||||
|
||||
type Config struct {
|
||||
original string
|
||||
prefix string
|
||||
suffix string
|
||||
extension string
|
||||
generator Generator
|
||||
}
|
||||
|
||||
func NewConfig(options ...Option) Config {
|
||||
conf := Config{
|
||||
extension: ".txt",
|
||||
generator: uuidGen,
|
||||
}
|
||||
for _, opt := range options {
|
||||
opt(&conf)
|
||||
}
|
||||
return conf
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue