From 10fb2dab1421bd000b5eaad313535a219199fa01 Mon Sep 17 00:00:00 2001 From: RiceChuan Date: Sun, 15 Dec 2024 13:45:52 +0800 Subject: [PATCH] chore: use errors.New to replace fmt.Errorf with no parameters Signed-off-by: RiceChuan --- amp/shard_tracker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amp/shard_tracker.go b/amp/shard_tracker.go index 473447e4e4..477e141673 100644 --- a/amp/shard_tracker.go +++ b/amp/shard_tracker.go @@ -3,6 +3,7 @@ package amp import ( "crypto/rand" "encoding/binary" + "errors" "fmt" "sync" @@ -139,7 +140,7 @@ func (s *ShardTracker) CancelShard(pid uint64) error { c, ok := s.shards[pid] if !ok { - return fmt.Errorf("pid not found") + return errors.New("pid not found") } delete(s.shards, pid)