Files
congqixia fb7d370050 fix: [GoSDK] support Timestamptz row insert (#53775)
getColumnCreators has no cases for FieldTypeTimestamptz or
FieldTypeGeometry, so a row-based insert into a collection containing
either field silently produced a nil column and panicked later in
AnyToColumns' AppendValue call (nil interface method dispatch).

Add column creators for both field types:
- Timestamptz maps to NewColumnTimestamptz; ColumnTimestamptz now
overrides AppendValue to accept time.Time, *time.Time and ISO 8601
strings (RFC3339Nano), matching the wire format the server expects.
- Geometry maps to NewColumnGeometryWKT.

Also add an exhaustive regression test enumerating all supported scalar
field types, asserting getColumnCreators yields a non-nil column, so a
future field type missing a creator is caught by CI instead of panicking
at runtime.

Related to #53764

---------

Signed-off-by: Congqi Xia <[email protected]>
2026-10-10 15:39:42 +08:00
..

Go MilvusClient

license Go Reference

Go MilvusClient for Milvus. To contribute code to this project, please read our contribution guidelines first.

Getting started

Prerequisites

Go 1.24.12 or higher

Install Milvus Go SDK

  1. Use go get to install the latest version of the Milvus Go SDK and dependencies:

    go get -u github.com/milvus-io/milvus/client/v3
    
  2. Include the Go MilvusClient in your application:

     import "github.com/milvus-io/milvus/client/v3/milvusclient"
    
     //...other snippet ...
     ctx, cancel := context.WithCancel(context.Background())
     defer cancel()
    
     milvusAddr := "YOUR_MILVUS_ENDPOINT"
    
     cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{
     	Address: milvusAddr,
     })
     if err != nil {
     	// handle error
     }
    
     // Do your work with milvus client
    

API Documentation

Refer to https://milvus.io/api-reference/go/v3.0.x/About.md for the Go SDK API documentation.

Code format

The Go source code is formatted using gci & gofumpt. Please run make lint-fix before sumbit a PR.