Fix golint error in proxy (#10621)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/10626/head
zhenshan.cao 2021-10-25 23:42:29 +08:00 committed by GitHub
parent 9458e04538
commit 4b0fd28de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -1145,7 +1145,7 @@ func (cct *createCollectionTask) PreExecute(ctx context.Context) error {
return err
}
if err := ValidatePrimaryKey(cct.schema); err != nil {
if err := validatePrimaryKey(cct.schema); err != nil {
return err
}

View File

@ -1013,7 +1013,7 @@ func TestCreateCollectionTask(t *testing.T) {
err = task.PreExecute(ctx)
assert.Error(t, err)
// ValidatePrimaryKey
// validatePrimaryKey
schema = proto.Clone(schemaBackup).(*schemapb.CollectionSchema)
for idx := range schema.Fields {
schema.Fields[idx].IsPrimaryKey = false

View File

@ -174,7 +174,7 @@ func ValidateDuplicatedFieldName(fields []*schemapb.FieldSchema) error {
return nil
}
//ValidateFieldAutoID call after ValidatePrimaryKey
//ValidateFieldAutoID call after validatePrimaryKey
func ValidateFieldAutoID(coll *schemapb.CollectionSchema) error {
var idx = -1
for i, field := range coll.Fields {
@ -191,7 +191,7 @@ func ValidateFieldAutoID(coll *schemapb.CollectionSchema) error {
return nil
}
func ValidatePrimaryKey(coll *schemapb.CollectionSchema) error {
func validatePrimaryKey(coll *schemapb.CollectionSchema) error {
idx := -1
for i, field := range coll.Fields {
if field.IsPrimaryKey {