From 435196300eb56cca308ea2a4aaba7e2183b0e1e5 Mon Sep 17 00:00:00 2001 From: nichtsen Date: Tue, 7 Sep 2021 19:08:55 +0800 Subject: [PATCH] deepsource: simplify error construction --- core/logs/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/logs/file.go b/core/logs/file.go index 75e076b1..590674b3 100644 --- a/core/logs/file.go +++ b/core/logs/file.go @@ -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 }