github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/list_collections.md (about) 1 # List Collections 2 3 API to list all collections in the connected Milvus instance. 4 5 ## Parameters 6 | Parameter | Description | Type | 7 | ------------ | ------------------------------------------------------------ | ------------------------ | 8 | `ctx` | Context to control API invocation process. | context.Context | 9 10 ## Response 11 12 - `collections`: array of entity.Collection that represents the collections in the Milvus instance. 13 14 - `err`: error in the listing process (if any). Possible errors are listed below: 15 16 - `ErrClientNotReady`: error that the client is not connected. 17 18 - Error that API invocation failed. 19 20 ## Example 21 22 ```go 23 ctx := context.Background() 24 // cli is a valid Client instance 25 colls, err := cli.ListCollection(ctx) 26 // handles the error not nil 27 for _, coll := range colls { 28 // process each collection if needed 29 } 30 ```