From 580d1eaaeffd585494a04a3a9ea53543335b270d Mon Sep 17 00:00:00 2001 From: karel rehor Date: Fri, 9 Aug 2024 10:10:29 +0200 Subject: [PATCH] docs: update ExampleWriteAPI_errors --- api/examples_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/examples_test.go b/api/examples_test.go index 01853c6..edbff24 100644 --- a/api/examples_test.go +++ b/api/examples_test.go @@ -11,7 +11,6 @@ import ( "time" "github.com/influxdata/influxdb-client-go/v2/api" - apiHttp "github.com/influxdata/influxdb-client-go/v2/api/http" "github.com/influxdata/influxdb-client-go/v2/api/write" "github.com/influxdata/influxdb-client-go/v2/domain" influxdb2 "github.com/influxdata/influxdb-client-go/v2/internal/examples" @@ -124,7 +123,7 @@ func ExampleWriteAPI_errors() { go func() { for err := range errorsCh { fmt.Printf("write error: %s\n", err.Error()) - fmt.Printf("trace-id: %s\n", err.(*apiHttp.Error).Header.Get("Trace-ID")) + fmt.Printf("trace-id: %s\n", err.(*write.Error).GetHeader("Trace-ID")) } }() // write some points