mirror of https://github.com/milvus-io/milvus.git
Fix golint error in proxy (#10621)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/10626/head
parent
9458e04538
commit
4b0fd28de7
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue