From d045951eaedb329d20d71c878b10ff4e27f72d60 Mon Sep 17 00:00:00 2001 From: RiceChuan Date: Wed, 11 Dec 2024 17:26:17 +0800 Subject: [PATCH] chore: use errors.New to replace fmt.Errorf with no parameters Signed-off-by: RiceChuan --- cmd/conf/init.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/conf/init.go b/cmd/conf/init.go index 74bd89fd16..46b37abdc4 100644 --- a/cmd/conf/init.go +++ b/cmd/conf/init.go @@ -1,6 +1,7 @@ package conf import ( + "errors" "fmt" "runtime" "strings" @@ -120,7 +121,7 @@ func (c *InitConfig) Validate() error { if reorgOption >= 0 { numReorgOptionsSpecified++ if numReorgOptionsSpecified > 1 { - return fmt.Errorf("at most one init reorg option can be specified") + return errors.New("at most one init reorg option can be specified") } } }