✨ Separate formatters in config
This commit is contained in:
parent
99f6dc3f8c
commit
da3b524925
6 changed files with 56 additions and 11 deletions
|
|
@ -6,7 +6,7 @@ import (
|
|||
"codeberg.org/danjones000/my-log/config"
|
||||
)
|
||||
|
||||
type formatMaker func(oo config.Outputs) (Formatter, error)
|
||||
type formatMaker func(config.Formatters) (Formatter, error)
|
||||
|
||||
var formatterMap = map[string]formatMaker{
|
||||
"plain": newPlain,
|
||||
|
|
@ -19,7 +19,7 @@ func New(kind string) (f Formatter, err error) {
|
|||
}
|
||||
|
||||
if make, ok := formatterMap[kind]; ok {
|
||||
return make(conf.Outputs)
|
||||
return make(conf.Formatters)
|
||||
}
|
||||
|
||||
return nil, errors.New("unimplemented")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue