DropCollection()即将作废
This method drops the specified collection and the entities within.
func (c *GrpcClient) DropCollection(ctx context.Context, collName string) error
Request Parameters
| Parameter | Description | Type | 
|---|---|---|
| 
 | Context for the current call to work. | 
 | 
| 
 | Name of the collection to drop. | 
 | 
Return
Null
Errors
Any error in the execution of the request. Possible errors are as follows:
- 
ErrClientNotReady: The client is not connected to Milvus.
- 
ErrCollectionNotExists: The collection with the specified name does not exist.
- 
The call to this API fails. 
Example
// drop collection
errDrop := mc.DropCollection(context.Background(), collectionName)
if errDrop != nil {
   log.Fatal("failed to drop collection:", errDrop.Error())
}