[skip ci]Fix error log output format in schema.go (#13231)

Signed-off-by: JackLCL <chenglong.li@zilliz.com>
This commit is contained in:
JackLCL 2021-12-13 13:29:37 +08:00 committed by GitHub
parent d91d5d765b
commit 4992c87d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ func CreateSchemaHelper(schema *schemapb.CollectionSchema) (*SchemaHelper, error
// GetPrimaryKeyField returns the schema of the primary key
func (helper *SchemaHelper) GetPrimaryKeyField() (*schemapb.FieldSchema, error) {
if helper.primaryKeyOffset == -1 {
return nil, fmt.Errorf("Failed to get primary key field: no primary in schema")
return nil, fmt.Errorf("failed to get primary key field: no primary in schema")
}
return helper.schema.Fields[helper.primaryKeyOffset], nil
}