From c18040bfce6d491070f5f2ceaa03e0019f735214 Mon Sep 17 00:00:00 2001 From: Sanbei Date: Sat, 13 Sep 2025 20:34:54 +0800 Subject: [PATCH] should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) [rule S1028](https://staticcheck.dev/docs/checks/#S1028) --- time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time.go b/time.go index 4cd0a05..1ad8616 100644 --- a/time.go +++ b/time.go @@ -60,7 +60,7 @@ func (t *Time) Scan(src interface{}) error { case time.Time: t.setFromTime(v) default: - return errors.New(fmt.Sprintf("failed to scan value: %v", v)) + return fmt.Errorf("failed to scan value: %v", v) } return nil