deepsource: simplify error construction

This commit is contained in:
nichtsen 2021-09-07 19:08:55 +08:00
parent 9212d69383
commit 435196300e

View File

@ -136,7 +136,7 @@ func (w *fileLogWriter) Init(config string) error {
if len(w.Formatter) > 0 {
fmtr, ok := GetFormatter(w.Formatter)
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
}