DropCollection()
Addedv2.5.x
This method drops a collection.
func (c *Client) DropCollection(ctx context.Context, option DropCollectionOption, callOptions ...grpc.CallOption) error
Request Parameters
| Parameter | Description | Type | 
|---|---|---|
| 
 | Context for the current call to work. | 
 | 
| 
 | Optional parameters of the methods. | |
| 
 | Optional parameters for calling the methods. | 
 | 
DropCollectionOption
This is an interface type. The dropCollectionOption struct type implements this interface type.
You can use the NewDropCollectionOption() function to get the concrete implementation.
NewDropCollectionOption
The signature of this method is as follows:
func NewDropCollectionOption(name string) *dropCollectionOption
| Parameter | Description | Type | 
|---|---|---|
| 
 | Name of the collection to drop. | 
 | 
Return
Null
Example
import (
        "context"
        "github.com/milvus-io/milvus/client/v2/milvusclient"
)
err = cli.DropCollection(ctx, milvusclient.NewDropCollectionOption("customized_setup_2"))
if err != nil {
       // handle err
}