Repository: influxdata/influxdb-client-go (go)

Issue:
2.0: go.mod invalid
After latest release go.mod seems invalid:

```
❯ go get github.com/influxdata/influxdb-client-go@v2.0.0
go get github.com/influxdata/influxdb-client-go@v2.0.0: github.com/influxdata/influxdb-client-go@v2.0.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
```

I assume you'll need to add a /v2 to the go.mod path

Pull request description:
fix: Properly upgrading library for new major version
Closes #186

## Proposed Changes

Properly upgraded module path to github.com/influxdata/influxdb-client-go/v2

## Checklist

- [X] CHANGELOG.md updated
- [X] Rebased/mergeable
- [X] Tests pass
- [X] Commit messages are in [semantic format](https://seesparkbox.com/foundry/semantic_commit_messages)



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f1f8c7e..dcaafc0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,7 @@
-## 2.1.0 [In progress]
+## 2.0.1 [In progress]
+### Bug fixes 
+1. [#187](https://github.com/influxdata/influxdb-client-go/pull/187) Properly updated library for new major version.
+
 ## 2.0.0 [2020-08-14]
 ### Breaking changes
 1. [#173](https://github.com/influxdata/influxdb-client-go/pull/173) Removed deprecated API.
diff --git a/README.md b/README.md
index e18d7ab..bef336f 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ import (
     "fmt"
     "time"
 
-    "github.com/influxdata/influxdb-client-go"
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -154,9 +154,10 @@ package main
 
 import (
     "fmt"
-    "github.com/influxdata/influxdb-client-go"
     "math/rand"
     "time"
+    
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -205,7 +206,7 @@ import (
     "math/rand"
     "time"
 
-    "github.com/influxdata/influxdb-client-go"
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -253,9 +254,10 @@ package main
 import (
     "context"
     "fmt"
-    "github.com/influxdata/influxdb-client-go"
     "math/rand"
     "time"
+
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -305,7 +307,8 @@ package main
 import (
     "context"
     "fmt"
-    "github.com/influxdata/influxdb-client-go"
+
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -347,7 +350,8 @@ package main
 import (
     "context"
     "fmt"
-    "github.com/influxdata/influxdb-client-go"
+
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
@@ -397,7 +401,7 @@ import (
     "fmt"
     "time"
 
-    "github.com/influxdata/influxdb-client-go"
+    "github.com/influxdata/influxdb-client-go/v2"
 )
 
 func main() {
diff --git a/api/authorizations.go b/api/authorizations.go
index 28f2902..a92db3d 100644
--- a/api/authorizations.go
+++ b/api/authorizations.go
@@ -6,7 +6,8 @@ package api
 
 import (
 	"context"
-	"github.com/influxdata/influxdb-client-go/domain"
+
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // AuthorizationsAPI provides methods for organizing Authorization in a InfluxDB server
diff --git a/api/buckets.go b/api/buckets.go
index 133ff4f..27164f0 100644
--- a/api/buckets.go
+++ b/api/buckets.go
@@ -7,7 +7,8 @@ package api
 import (
 	"context"
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/domain"
+
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // BucketsAPI provides methods for managing Buckets in a InfluxDB server.
diff --git a/api/delete.go b/api/delete.go
index d7c22a6..abfba16 100644
--- a/api/delete.go
+++ b/api/delete.go
@@ -6,7 +6,7 @@ package api
 
 import (
 	"context"
-	"github.com/influxdata/influxdb-client-go/domain"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"time"
 )
 
diff --git a/api/http/service.go b/api/http/service.go
index 0c3558b..6bff4d3 100644
--- a/api/http/service.go
+++ b/api/http/service.go
@@ -22,8 +22,8 @@ import (
 	"net/url"
 	"strconv"
 
-	http2 "github.com/influxdata/influxdb-client-go/internal/http"
-	"github.com/influxdata/influxdb-client-go/internal/log"
+	http2 "github.com/influxdata/influxdb-client-go/v2/internal/http"
+	"github.com/influxdata/influxdb-client-go/v2/internal/log"
 )
 
 // RequestCallback defines function called after a request is created before any call
diff --git a/api/labels.go b/api/labels.go
index 83bef1d..1a3ac0a 100644
--- a/api/labels.go
+++ b/api/labels.go
@@ -7,7 +7,8 @@ package api
 import (
 	"context"
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/domain"
+
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // LabelsAPI provides methods for managing labels in a InfluxDB server.
diff --git a/api/organizations.go b/api/organizations.go
index 4bafcf6..6671f5b 100644
--- a/api/organizations.go
+++ b/api/organizations.go
@@ -7,7 +7,8 @@ package api
 import (
 	"context"
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/domain"
+
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // OrganizationsAPI provides methods for managing Organizations in a InfluxDB server.
diff --git a/api/paging.go b/api/paging.go
index df1ddb1..80acec5 100644
--- a/api/paging.go
+++ b/api/paging.go
@@ -4,7 +4,7 @@
 
 package api
 
-import "github.com/influxdata/influxdb-client-go/domain"
+import "github.com/influxdata/influxdb-client-go/v2/domain"
 
 type PagingOption func(p *Paging)
 
diff --git a/api/query.go b/api/query.go
index ff4d92f..962db30 100644
--- a/api/query.go
+++ b/api/query.go
@@ -23,10 +23,10 @@ import (
 	"sync"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/query"
-	"github.com/influxdata/influxdb-client-go/domain"
-	"github.com/influxdata/influxdb-client-go/internal/log"
+	http2 "github.com/influxdata/influxdb-client-go/v2/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/query"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
+	"github.com/influxdata/influxdb-client-go/v2/internal/log"
 )
 
 const (
diff --git a/api/users.go b/api/users.go
index b6c27ab..a49bad2 100644
--- a/api/users.go
+++ b/api/users.go
@@ -7,7 +7,7 @@ package api
 import (
 	"context"
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/domain"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // UsersAPI provides methods for managing users in a InfluxDB server
diff --git a/api/write.go b/api/write.go
index 7ce3195..7b2e2f9 100644
--- a/api/write.go
+++ b/api/write.go
@@ -9,10 +9,10 @@ import (
 	"strings"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/internal/log"
-	iwrite "github.com/influxdata/influxdb-client-go/internal/write"
+	http2 "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/internal/log"
+	iwrite "github.com/influxdata/influxdb-client-go/v2/internal/write"
 )
 
 // WriteAPI is Write client interface with non-blocking methods for writing time series data asynchronously in batches into an InfluxDB server.
diff --git a/api/writeAPIBlocking.go b/api/writeAPIBlocking.go
index 6cb7f82..f73609b 100644
--- a/api/writeAPIBlocking.go
+++ b/api/writeAPIBlocking.go
@@ -8,9 +8,9 @@ import (
 	"context"
 	"strings"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	iwrite "github.com/influxdata/influxdb-client-go/internal/write"
+	http2 "github.com/influxdata/influxdb-client-go/v2/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/write"
+	iwrite "github.com/influxdata/influxdb-client-go/v2/internal/write"
 )
 
 // WriteAPIBlocking offers blocking methods for writing time series data synchronously into an InfluxDB server.
diff --git a/client.go b/client.go
index a5e8f3e..a8c0df4 100644
--- a/client.go
+++ b/client.go
@@ -12,11 +12,11 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/influxdata/influxdb-client-go/api"
-	"github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/domain"
-	ilog "github.com/influxdata/influxdb-client-go/internal/log"
-	"github.com/influxdata/influxdb-client-go/log"
+	"github.com/influxdata/influxdb-client-go/v2/api"
+	"github.com/influxdata/influxdb-client-go/v2/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
+	ilog "github.com/influxdata/influxdb-client-go/v2/internal/log"
+	"github.com/influxdata/influxdb-client-go/v2/log"
 )
 
 // Client provides API to communicate with InfluxDBServer.
diff --git a/compatibility.go b/compatibility.go
index ef7d9c2..3e2a517 100644
--- a/compatibility.go
+++ b/compatibility.go
@@ -5,9 +5,9 @@
 package influxdb2
 
 import (
-	"github.com/influxdata/influxdb-client-go/api"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/domain"
+	"github.com/influxdata/influxdb-client-go/v2/api"
+	"github.com/influxdata/influxdb-client-go/v2/api/write"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"time"
 )
 
diff --git a/domain/client.gen.go b/domain/client.gen.go
index ee9d126..be693cf 100644
--- a/domain/client.gen.go
+++ b/domain/client.gen.go
@@ -16,7 +16,7 @@ import (
 	"net/url"
 	"strings"
 
-	ihttp "github.com/influxdata/influxdb-client-go/api/http"
+	ihttp "github.com/influxdata/influxdb-client-go/v2/api/http"
 )
 
 // Client which conforms to the OpenAPI3 specification for this service.
diff --git a/domain/templates/imports.tmpl b/domain/templates/imports.tmpl
index f9893a3..ce28cf3 100644
--- a/domain/templates/imports.tmpl
+++ b/domain/templates/imports.tmpl
@@ -7,6 +7,6 @@ package {{.PackageName}}
 import (
 {{range .Imports}} {{ . }}
 {{end}}
-    ihttp "github.com/influxdata/influxdb-client-go/api/http"
+    ihttp "github.com/influxdata/influxdb-client-go/v2/api/http"
 )
 {{end}}
diff --git a/domain/utils.go b/domain/utils.go
index 2281ef7..0fea8ea 100644
--- a/domain/utils.go
+++ b/domain/utils.go
@@ -5,7 +5,7 @@
 package domain
 
 import (
-	"github.com/influxdata/influxdb-client-go/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/http"
 )
 
 func DomainErrorToError(error *Error, statusCode int) *http.Error {
diff --git a/go.mod b/go.mod
index 1827bd1..1f5a8ff 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/influxdata/influxdb-client-go
+module github.com/influxdata/influxdb-client-go/v2
 
 go 1.13
 
diff --git a/internal/examples/fakeclient.go b/internal/examples/fakeclient.go
index b606f57..8280a23 100644
--- a/internal/examples/fakeclient.go
+++ b/internal/examples/fakeclient.go
@@ -8,8 +8,8 @@ package examples
 
 import (
 	"context"
-	"github.com/influxdata/influxdb-client-go/api"
-	"github.com/influxdata/influxdb-client-go/domain"
+	"github.com/influxdata/influxdb-client-go/v2/api"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 // Options is fake options to satisfy Client interface
diff --git a/internal/log/logger.go b/internal/log/logger.go
index aa5a212..e9bd297 100644
--- a/internal/log/logger.go
+++ b/internal/log/logger.go
@@ -6,7 +6,7 @@
 package log
 
 import (
-	ilog "github.com/influxdata/influxdb-client-go/log"
+	ilog "github.com/influxdata/influxdb-client-go/v2/log"
 )
 
 func Debugf(format string, v ...interface{}) {
diff --git a/internal/write/service.go b/internal/write/service.go
index cb2b3de..9b6410c 100644
--- a/internal/write/service.go
+++ b/internal/write/service.go
@@ -16,10 +16,10 @@ import (
 	"sync"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/internal/gzip"
-	"github.com/influxdata/influxdb-client-go/internal/log"
+	http2 "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/internal/gzip"
+	"github.com/influxdata/influxdb-client-go/v2/internal/log"
 	lp "github.com/influxdata/line-protocol"
 )
 
diff --git a/options.go b/options.go
index 80d0b81..3f87785 100644
--- a/options.go
+++ b/options.go
@@ -9,8 +9,8 @@ import (
 	nethttp "net/http"
 	"time"
 
-	"github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
+	"github.com/influxdata/influxdb-client-go/v2/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/write"
 )
 
 // Options holds configuration properties for communicating with InfluxDB server
diff --git a/version.go b/version.go
index 70fb11a..5dce1f9 100644
--- a/version.go
+++ b/version.go
@@ -6,12 +6,13 @@ package influxdb2
 
 import (
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/internal/http"
 	"runtime"
+
+	"github.com/influxdata/influxdb-client-go/v2/internal/http"
 )
 
 const (
-	Version = "2.1.0"
+	Version = "2.0.1"
 )
 
 func init() {


Test patch:
diff --git a/api/authorizations_e2e_test.go b/api/authorizations_e2e_test.go
index ff3d9b9..cc41554 100644
--- a/api/authorizations_e2e_test.go
+++ b/api/authorizations_e2e_test.go
@@ -8,12 +8,13 @@ package api_test
 
 import (
 	"context"
-	influxdb2 "github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/domain"
-	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/require"
 	"os"
 	"testing"
+
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
+	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/require"
 )
 
 var authToken string
diff --git a/api/buckets_e2e_test.go b/api/buckets_e2e_test.go
index 486f98a..1b6c371 100644
--- a/api/buckets_e2e_test.go
+++ b/api/buckets_e2e_test.go
@@ -12,9 +12,9 @@ import (
 	"strings"
 	"testing"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/api"
-	"github.com/influxdata/influxdb-client-go/domain"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/api"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/delete_e2e_test.go b/api/delete_e2e_test.go
index af552f3..a8545d7 100644
--- a/api/delete_e2e_test.go
+++ b/api/delete_e2e_test.go
@@ -8,14 +8,14 @@ package api_test
 
 import (
 	"context"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/domain"
 	"strconv"
 	"strings"
 	"testing"
 	"time"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/api/write"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/examples_test.go b/api/examples_test.go
index c52a0a3..cd2a5de 100644
--- a/api/examples_test.go
+++ b/api/examples_test.go
@@ -3,12 +3,13 @@ package api_test
 import (
 	"context"
 	"fmt"
-	"github.com/influxdata/influxdb-client-go/api"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/domain"
-	influxdb2 "github.com/influxdata/influxdb-client-go/internal/examples"
 	"math/rand"
 	"time"
+
+	"github.com/influxdata/influxdb-client-go/v2/api"
+	"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"
 )
 
 func ExampleBucketsAPI() {
diff --git a/api/http/options_test.go b/api/http/options_test.go
index d8e2420..a883781 100644
--- a/api/http/options_test.go
+++ b/api/http/options_test.go
@@ -10,7 +10,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/influxdata/influxdb-client-go/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/http"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/api/labels_e2e_test.go b/api/labels_e2e_test.go
index ed156f5..680d890 100644
--- a/api/labels_e2e_test.go
+++ b/api/labels_e2e_test.go
@@ -8,10 +8,10 @@ package api_test
 
 import (
 	"context"
-	"github.com/influxdata/influxdb-client-go/domain"
 	"testing"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/organizations_e2e_test.go b/api/organizations_e2e_test.go
index 02efb5e..efc87d2 100644
--- a/api/organizations_e2e_test.go
+++ b/api/organizations_e2e_test.go
@@ -10,8 +10,8 @@ import (
 	"context"
 	"testing"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/domain"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/paging_test.go b/api/paging_test.go
index cd0c603..d195ca0 100644
--- a/api/paging_test.go
+++ b/api/paging_test.go
@@ -5,9 +5,10 @@
 package api
 
 import (
-	"github.com/influxdata/influxdb-client-go/domain"
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/influxdata/influxdb-client-go/v2/domain"
+	"github.com/stretchr/testify/assert"
 )
 
 func TestPaging(t *testing.T) {
diff --git a/api/query_test.go b/api/query_test.go
index 198d9a4..4ce665c 100644
--- a/api/query_test.go
+++ b/api/query_test.go
@@ -15,9 +15,9 @@ import (
 	"testing"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/query"
-	"github.com/influxdata/influxdb-client-go/internal/gzip"
+	http2 "github.com/influxdata/influxdb-client-go/v2/api/http"
+	"github.com/influxdata/influxdb-client-go/v2/api/query"
+	"github.com/influxdata/influxdb-client-go/v2/internal/gzip"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/users_e2e_test.go b/api/users_e2e_test.go
index 2cdc169..2d4d790 100644
--- a/api/users_e2e_test.go
+++ b/api/users_e2e_test.go
@@ -10,8 +10,8 @@ import (
 	"context"
 	"testing"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/domain"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/write/options_test.go b/api/write/options_test.go
index 5c2a1ee..1398ade 100644
--- a/api/write/options_test.go
+++ b/api/write/options_test.go
@@ -9,7 +9,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/influxdata/influxdb-client-go/api/write"
+	"github.com/influxdata/influxdb-client-go/v2/api/write"
 )
 
 func TestDefaultOptions(t *testing.T) {
diff --git a/api/writeAPIBlocking_test.go b/api/writeAPIBlocking_test.go
index 4af3ed3..fd46a8e 100644
--- a/api/writeAPIBlocking_test.go
+++ b/api/writeAPIBlocking_test.go
@@ -10,9 +10,9 @@ import (
 	"testing"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/internal/test"
+	http2 "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/internal/test"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/api/write_test.go b/api/write_test.go
index f364951..12ee63c 100644
--- a/api/write_test.go
+++ b/api/write_test.go
@@ -12,10 +12,10 @@ import (
 	"testing"
 	"time"
 
-	"github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/internal/test"
-	"github.com/influxdata/influxdb-client-go/log"
+	"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/internal/test"
+	"github.com/influxdata/influxdb-client-go/v2/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/client_e2e_test.go b/client_e2e_test.go
index a2291a4..6cdecca 100644
--- a/client_e2e_test.go
+++ b/client_e2e_test.go
@@ -15,8 +15,8 @@ import (
 	"testing"
 	"time"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/domain"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/client_test.go b/client_test.go
index bb54c6f..cd001da 100644
--- a/client_test.go
+++ b/client_test.go
@@ -7,14 +7,14 @@ package influxdb2
 import (
 	"context"
 	"fmt"
-	http3 "github.com/influxdata/influxdb-client-go/api/http"
 	"net/http"
 	"net/http/httptest"
 	"testing"
 	"time"
 
-	http2 "github.com/influxdata/influxdb-client-go/internal/http"
-	iwrite "github.com/influxdata/influxdb-client-go/internal/write"
+	http3 "github.com/influxdata/influxdb-client-go/v2/api/http"
+	http2 "github.com/influxdata/influxdb-client-go/v2/internal/http"
+	iwrite "github.com/influxdata/influxdb-client-go/v2/internal/write"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/examples_test.go b/examples_test.go
index d371ced..7f08b87 100644
--- a/examples_test.go
+++ b/examples_test.go
@@ -4,8 +4,8 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/influxdata/influxdb-client-go"
-	"github.com/influxdata/influxdb-client-go/domain"
+	"github.com/influxdata/influxdb-client-go/v2"
+	"github.com/influxdata/influxdb-client-go/v2/domain"
 )
 
 func ExampleClient_newClient() {
diff --git a/internal/gzip/gzip_test.go b/internal/gzip/gzip_test.go
index 9598994..d1fb7a0 100644
--- a/internal/gzip/gzip_test.go
+++ b/internal/gzip/gzip_test.go
@@ -10,7 +10,7 @@ import (
 	"io/ioutil"
 	"testing"
 
-	"github.com/influxdata/influxdb-client-go/internal/gzip"
+	"github.com/influxdata/influxdb-client-go/v2/internal/gzip"
 )
 
 func TestGzip(t *testing.T) {
diff --git a/internal/log/logger_test.go b/internal/log/logger_test.go
index 4be462e..3e5dc43 100644
--- a/internal/log/logger_test.go
+++ b/internal/log/logger_test.go
@@ -9,8 +9,8 @@ import (
 	"strings"
 	"testing"
 
-	ilog "github.com/influxdata/influxdb-client-go/internal/log"
-	dlog "github.com/influxdata/influxdb-client-go/log"
+	ilog "github.com/influxdata/influxdb-client-go/v2/internal/log"
+	dlog "github.com/influxdata/influxdb-client-go/v2/log"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/test/http_service.go b/internal/test/http_service.go
index a211096..041c3dc 100644
--- a/internal/test/http_service.go
+++ b/internal/test/http_service.go
@@ -16,7 +16,7 @@ import (
 	"sync"
 	"testing"
 
-	http2 "github.com/influxdata/influxdb-client-go/api/http"
+	http2 "github.com/influxdata/influxdb-client-go/v2/api/http"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/write/service_test.go b/internal/write/service_test.go
index 42f0e50..89448c4 100644
--- a/internal/write/service_test.go
+++ b/internal/write/service_test.go
@@ -9,10 +9,10 @@ import (
 	"testing"
 	"time"
 
-	"github.com/influxdata/influxdb-client-go/api/http"
-	"github.com/influxdata/influxdb-client-go/api/write"
-	"github.com/influxdata/influxdb-client-go/internal/test"
-	"github.com/influxdata/influxdb-client-go/log"
+	"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/internal/test"
+	"github.com/influxdata/influxdb-client-go/v2/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/log/logger_test.go b/log/logger_test.go
index 67f12d0..89c3a72 100644
--- a/log/logger_test.go
+++ b/log/logger_test.go
@@ -10,7 +10,7 @@ import (
 	"strings"
 	"testing"
 
-	dlog "github.com/influxdata/influxdb-client-go/log"
+	dlog "github.com/influxdata/influxdb-client-go/v2/log"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/options_test.go b/options_test.go
index 5be591c..0c62341 100644
--- a/options_test.go
+++ b/options_test.go
@@ -9,7 +9,7 @@ import (
 	"testing"
 	"time"
 
-	influxdb2 "github.com/influxdata/influxdb-client-go"
+	influxdb2 "github.com/influxdata/influxdb-client-go/v2"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )