Use fmt.Errorf instead of string concat in querynode/segment.go (#16422)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2022-04-25 16:11:48 +08:00 committed by GitHub
parent 7af02fa531
commit bb69e09736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {