deepsource: simplify error construction
This commit is contained in:
parent
9212d69383
commit
435196300e
@ -136,7 +136,7 @@ func (w *fileLogWriter) Init(config string) error {
|
|||||||
if len(w.Formatter) > 0 {
|
if len(w.Formatter) > 0 {
|
||||||
fmtr, ok := GetFormatter(w.Formatter)
|
fmtr, ok := GetFormatter(w.Formatter)
|
||||||
if !ok {
|
if !ok {
|
||||||
return errors.New(fmt.Sprintf("the formatter with name: %s not found", w.Formatter))
|
return fmt.Errorf("the formatter with name: %s not found", w.Formatter)
|
||||||
}
|
}
|
||||||
w.formatter = fmtr
|
w.formatter = fmtr
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user