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