github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/README.md (about) 1 # Milvus Go SDK 2 3 [![license](https://img.shields.io/hexpm/l/plug.svg?color=green)](https://github.com/milvus-io/milvus-sdk-go/blob/master/LICENSE) 4 [![Mergify Status][mergify-status]][mergify] 5 [![Go Reference](https://pkg.go.dev/badge/github.com/milvus-io/milvus-sdk-go/v2.svg)](https://pkg.go.dev/github.com/milvus-io/milvus-sdk-go/v2) 6 7 [mergify]: https://mergify.io 8 [mergify-status]: https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/milvus-io/milvus-sdk-go&style=plastic 9 10 11 Go SDK for [Milvus](https://github.com/milvus-io/milvus). To contribute code to this project, please read our [contribution guidelines](https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md) first. 12 13 14 ## SDK versions 15 16 |Milvus version| Recommended Go SDK version | 17 |:-----:|:-----:| 18 | 2.4.x | [2.4.0](https://github.com/milvus-io/milvus-sdk-go/tree/v2.4.0) | 19 | 2.3.x | [2.3.1](https://github.com/milvus-io/milvus-sdk-go/tree/v2.3.1) | 20 | 2.2.x | [2.2.8](https://github.com/milvus-io/milvus-sdk-go/tree/v2.2.8) | 21 | 2.1.0 | [2.1.0](https://github.com/milvus-io/milvus-sdk-go/tree/v2.1.0) | 22 | 2.0.0 | [2.0.0](https://github.com/milvus-io/milvus-sdk-go/tree/v2.0.0) | 23 | 1.1.x | [1.1.0](https://github.com/milvus-io/milvus-sdk-go/tree/v1.1.0) | 24 | 1.0.x | [1.0.0](https://github.com/milvus-io/milvus-sdk-go/tree/v1.0.0) | 25 26 Note: Major versions is NOT compatible between Milvus and SDK 27 28 ## Getting started 29 30 ### Prerequisites 31 32 Go 1.17 or higher 33 34 ### Install Milvus Go SDK 35 36 1. Use `go get` to install the latest version of the Milvus Go SDK and dependencies: 37 38 ```shell 39 go get -u github.com/milvus-io/milvus-sdk-go/v2 40 ``` 41 42 2. Include the Milvus Go SDK in your application: 43 44 ```go 45 import "github.com/milvus-io/milvus-sdk-go/v2/client" 46 47 //...other snippet ... 48 client, err := client.NewClient(context.Background(), client.Config{ 49 Address: "localhost:19530", 50 }) 51 if err != nil { 52 // handle error 53 } 54 defer client.Close() 55 56 client.HasCollection(context.Background(), "YOUR_COLLECTION_NAME") 57 ``` 58 59 ### API Documentation 60 61 Refer to [https://milvus.io/api-reference/go/v2.2.x/About.md](https://milvus.io/api-reference/go/v2.2.x/About.md) for the Go SDK API documentation. 62 63 ### Examples 64 65 See [examples](examples/README.md) about how to use this package to communicate with Milvus 66 67 ## Code format 68 69 The Go source code is formatted using gofmt and golint.