diff --git a/Makefile b/Makefile index f54eca25..7b69bd15 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ default: build build: clean fmt @cd cmd; \ CGO_ENABLED=0 go build -ldflags "\ - -X 'github.com/vesoft-inc/nebula-importer/pkg/version.GoVersion=$(shell go version)' \ - -X 'github.com/vesoft-inc/nebula-importer/pkg/version.GitHash=$(shell git rev-parse HEAD)'\ - -X 'github.com/vesoft-inc/nebula-importer/pkg/version.Tag=$(shell git describe --exact-match --abbrev=0 --tags | sed 's/^v//')'\ + -X 'github.com/vesoft-inc/nebula-importer/v3/pkg/version.GoVersion=$(shell go version)' \ + -X 'github.com/vesoft-inc/nebula-importer/v3/pkg/version.GitHash=$(shell git rev-parse HEAD)'\ + -X 'github.com/vesoft-inc/nebula-importer/v3/pkg/version.Tag=$(shell git describe --exact-match --abbrev=0 --tags | sed 's/^v//')'\ " -o nebula-importer; \ mv nebula-importer ..; @echo "nebula-importer has been outputed to $$(pwd)/nebula-importer"; diff --git a/cmd/importer.go b/cmd/importer.go index e2fa8c62..83a336f7 100644 --- a/cmd/importer.go +++ b/cmd/importer.go @@ -7,12 +7,12 @@ import ( "os" "time" - "github.com/vesoft-inc/nebula-importer/pkg/cmd" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/errors" - "github.com/vesoft-inc/nebula-importer/pkg/logger" - "github.com/vesoft-inc/nebula-importer/pkg/version" - "github.com/vesoft-inc/nebula-importer/pkg/web" + "github.com/vesoft-inc/nebula-importer/v3/pkg/cmd" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/errors" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/version" + "github.com/vesoft-inc/nebula-importer/v3/pkg/web" ) var configuration = flag.String("config", "", "Specify importer configure file path") diff --git a/go.mod b/go.mod index 2f0e0982..cc3d3cc3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/vesoft-inc/nebula-importer +module github.com/vesoft-inc/nebula-importer/v3 require ( github.com/cenkalti/backoff/v4 v4.1.3 @@ -8,7 +8,7 @@ require ( github.com/vesoft-inc/nebula-go/v3 v3.0.0-20220425030225-cdb52399b40a gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.1 + gopkg.in/yaml.v3 v3.0.1 // indirect ) go 1.13 diff --git a/pkg/client/clientmgr.go b/pkg/client/clientmgr.go index a28b94f4..2e6f15a5 100644 --- a/pkg/client/clientmgr.go +++ b/pkg/client/clientmgr.go @@ -1,9 +1,9 @@ package client import ( - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type NebulaClientMgr struct { diff --git a/pkg/client/clientpool.go b/pkg/client/clientpool.go index 59664a78..41706f48 100644 --- a/pkg/client/clientpool.go +++ b/pkg/client/clientpool.go @@ -8,9 +8,9 @@ import ( "github.com/cenkalti/backoff/v4" nebula "github.com/vesoft-inc/nebula-go/v3" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) const ( diff --git a/pkg/cmd/runner.go b/pkg/cmd/runner.go index ae54b5d8..7497b855 100644 --- a/pkg/cmd/runner.go +++ b/pkg/cmd/runner.go @@ -5,14 +5,14 @@ import ( "fmt" "sync" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/client" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/errhandler" - importerError "github.com/vesoft-inc/nebula-importer/pkg/errors" - "github.com/vesoft-inc/nebula-importer/pkg/logger" - "github.com/vesoft-inc/nebula-importer/pkg/reader" - "github.com/vesoft-inc/nebula-importer/pkg/stats" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/client" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/errhandler" + importerError "github.com/vesoft-inc/nebula-importer/v3/pkg/errors" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/reader" + "github.com/vesoft-inc/nebula-importer/v3/pkg/stats" ) type Runner struct { diff --git a/pkg/config/config.go b/pkg/config/config.go index 9812c593..3e5e1fac 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -10,11 +10,11 @@ import ( "strings" "time" - "github.com/vesoft-inc/nebula-importer/pkg/base" - ierrors "github.com/vesoft-inc/nebula-importer/pkg/errors" - "github.com/vesoft-inc/nebula-importer/pkg/logger" - "github.com/vesoft-inc/nebula-importer/pkg/picker" - "github.com/vesoft-inc/nebula-importer/pkg/utils" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + ierrors "github.com/vesoft-inc/nebula-importer/v3/pkg/errors" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/picker" + "github.com/vesoft-inc/nebula-importer/v3/pkg/utils" "gopkg.in/yaml.v2" ) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 28b46c84..8e2a5fac 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -10,10 +10,10 @@ import ( "text/template" "github.com/stretchr/testify/assert" - "github.com/vesoft-inc/nebula-importer/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" "gopkg.in/yaml.v2" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) func TestYAMLParser(t *testing.T) { diff --git a/pkg/csv/errwriter.go b/pkg/csv/errwriter.go index 4a52831d..a861c491 100644 --- a/pkg/csv/errwriter.go +++ b/pkg/csv/errwriter.go @@ -5,9 +5,9 @@ import ( "os" "strings" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type ErrWriter struct { diff --git a/pkg/csv/reader.go b/pkg/csv/reader.go index 9c7de73c..b31d80ab 100644 --- a/pkg/csv/reader.go +++ b/pkg/csv/reader.go @@ -8,9 +8,9 @@ import ( "io" "os" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type CSVReader struct { diff --git a/pkg/errhandler/datawriter.go b/pkg/errhandler/datawriter.go index e4c3bb1d..1a6201a6 100644 --- a/pkg/errhandler/datawriter.go +++ b/pkg/errhandler/datawriter.go @@ -3,7 +3,7 @@ package errhandler import ( "os" - "github.com/vesoft-inc/nebula-importer/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" ) type DataWriter interface { diff --git a/pkg/errhandler/handler.go b/pkg/errhandler/handler.go index b5dfb65c..5ad22acd 100644 --- a/pkg/errhandler/handler.go +++ b/pkg/errhandler/handler.go @@ -5,10 +5,10 @@ import ( "os" "strings" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/csv" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/csv" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type Handler struct { diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go index b25de059..870fddcd 100644 --- a/pkg/logger/logger.go +++ b/pkg/logger/logger.go @@ -8,7 +8,7 @@ import ( "path/filepath" "runtime" - "github.com/vesoft-inc/nebula-importer/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" ) type Logger interface { diff --git a/pkg/picker/converter-type.go b/pkg/picker/converter-type.go index 94c33ed0..9b0a6bcb 100644 --- a/pkg/picker/converter-type.go +++ b/pkg/picker/converter-type.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/vesoft-inc/nebula-importer/pkg/utils" + "github.com/vesoft-inc/nebula-importer/v3/pkg/utils" ) var ( diff --git a/pkg/reader/batch.go b/pkg/reader/batch.go index 0cf07abc..47390a7c 100644 --- a/pkg/reader/batch.go +++ b/pkg/reader/batch.go @@ -3,7 +3,7 @@ package reader import ( "fmt" - "github.com/vesoft-inc/nebula-importer/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" ) type Batch struct { diff --git a/pkg/reader/batchmgr.go b/pkg/reader/batchmgr.go index 8bc2e384..71be14b0 100644 --- a/pkg/reader/batchmgr.go +++ b/pkg/reader/batchmgr.go @@ -6,9 +6,9 @@ import ( "hash/fnv" "strings" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type BatchMgr struct { diff --git a/pkg/reader/reader.go b/pkg/reader/reader.go index cb22649c..4e570545 100644 --- a/pkg/reader/reader.go +++ b/pkg/reader/reader.go @@ -10,11 +10,11 @@ import ( "strings" "time" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/csv" - "github.com/vesoft-inc/nebula-importer/pkg/errors" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/csv" + "github.com/vesoft-inc/nebula-importer/v3/pkg/errors" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type DataFileReader interface { diff --git a/pkg/stats/statsmgr.go b/pkg/stats/statsmgr.go index 66423bae..eaa00045 100644 --- a/pkg/stats/statsmgr.go +++ b/pkg/stats/statsmgr.go @@ -4,10 +4,10 @@ import ( "fmt" "time" - "github.com/vesoft-inc/nebula-importer/pkg/base" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/logger" - "github.com/vesoft-inc/nebula-importer/pkg/reader" + "github.com/vesoft-inc/nebula-importer/v3/pkg/base" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/reader" ) type StatsMgr struct { diff --git a/pkg/web/httpserver.go b/pkg/web/httpserver.go index 8ab94699..a7e9d1dc 100644 --- a/pkg/web/httpserver.go +++ b/pkg/web/httpserver.go @@ -8,10 +8,10 @@ import ( "strings" "sync" - "github.com/vesoft-inc/nebula-importer/pkg/cmd" - "github.com/vesoft-inc/nebula-importer/pkg/config" - "github.com/vesoft-inc/nebula-importer/pkg/errors" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/cmd" + "github.com/vesoft-inc/nebula-importer/v3/pkg/config" + "github.com/vesoft-inc/nebula-importer/v3/pkg/errors" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type WebServer struct { diff --git a/pkg/web/taskmgr.go b/pkg/web/taskmgr.go index ff0bf44f..b1f98be2 100644 --- a/pkg/web/taskmgr.go +++ b/pkg/web/taskmgr.go @@ -3,8 +3,8 @@ package web import ( "sync" - "github.com/vesoft-inc/nebula-importer/pkg/cmd" - "github.com/vesoft-inc/nebula-importer/pkg/logger" + "github.com/vesoft-inc/nebula-importer/v3/pkg/cmd" + "github.com/vesoft-inc/nebula-importer/v3/pkg/logger" ) type taskMgr struct {