From bb69e097366841f8998359bc293f1edc382f6c33 Mon Sep 17 00:00:00 2001 From: congqixia Date: Mon, 25 Apr 2022 16:11:48 +0800 Subject: [PATCH] Use fmt.Errorf instead of string concat in querynode/segment.go (#16422) Signed-off-by: Congqi Xia --- internal/querynode/segment.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/querynode/segment.go b/internal/querynode/segment.go index 6129474ecb..df881db72c 100644 --- a/internal/querynode/segment.go +++ b/internal/querynode/segment.go @@ -33,7 +33,6 @@ import ( "encoding/binary" "errors" "fmt" - "strconv" "sync" "unsafe" @@ -165,7 +164,7 @@ func (s *Segment) getIndexedFieldInfo(fieldID UniqueID) (*IndexedFieldInfo, erro indexInfo: info.indexInfo, }, nil } - return nil, errors.New("Invalid fieldID " + strconv.Itoa(int(fieldID))) + return nil, fmt.Errorf("Invalid fieldID %d", fieldID) } func (s *Segment) hasLoadIndexForIndexedField(fieldID int64) bool {