From d838db66a7b74617d1b1cbb18978c6701073403c Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Thu, 22 Jul 2021 11:43:21 +0800 Subject: [PATCH 1/2] Fix module names --- {utils => common}/common.go | 0 {utils => common}/runtime.go | 0 controllers/db.go | 4 ++-- controllers/db_test.go | 3 ++- go.mod | 2 +- main.go | 2 +- routers/router.go | 3 +-- service/dao/dao.go | 4 ++-- service/pool/pool.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) rename {utils => common}/common.go (100%) rename {utils => common}/runtime.go (100%) diff --git a/utils/common.go b/common/common.go similarity index 100% rename from utils/common.go rename to common/common.go diff --git a/utils/runtime.go b/common/runtime.go similarity index 100% rename from utils/runtime.go rename to common/runtime.go diff --git a/controllers/db.go b/controllers/db.go index 232511b..781cfbc 100644 --- a/controllers/db.go +++ b/controllers/db.go @@ -2,10 +2,10 @@ package controllers import ( "encoding/json" - dao "nebula-http-gateway/service/dao" - common "nebula-http-gateway/utils" "github.com/astaxie/beego" + "github.com/vesoft-inc/nebula-http-gateway/common" + "github.com/vesoft-inc/nebula-http-gateway/service/dao" ) type DatabaseController struct { diff --git a/controllers/db_test.go b/controllers/db_test.go index 8cf060e..b589ea9 100644 --- a/controllers/db_test.go +++ b/controllers/db_test.go @@ -5,9 +5,10 @@ import ( "encoding/json" "io/ioutil" "log" - common "nebula-http-gateway/utils" "net/http" "testing" + + "github.com/vesoft-inc/nebula-http-gateway/common" ) type Response struct { diff --git a/go.mod b/go.mod index 9c0e472..43407b6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module nebula-http-gateway +module github.com/vesoft-inc/nebula-http-gateway go 1.13 diff --git a/main.go b/main.go index 0438a06..804bf06 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - _ "nebula-http-gateway/routers" + _ "github.com/vesoft-inc/nebula-http-gateway/routers" "github.com/astaxie/beego" ) diff --git a/routers/router.go b/routers/router.go index 36723b2..d71c579 100644 --- a/routers/router.go +++ b/routers/router.go @@ -1,9 +1,8 @@ package routers import ( - "nebula-http-gateway/controllers" - "github.com/astaxie/beego" + "github.com/vesoft-inc/nebula-http-gateway/controllers" ) func init() { diff --git a/service/dao/dao.go b/service/dao/dao.go index bc88b93..7a2ab5b 100644 --- a/service/dao/dao.go +++ b/service/dao/dao.go @@ -4,8 +4,8 @@ import ( "errors" "log" - "nebula-http-gateway/service/pool" - common "nebula-http-gateway/utils" + "github.com/vesoft-inc/nebula-http-gateway/common" + "github.com/vesoft-inc/nebula-http-gateway/service/pool" nebula "github.com/vesoft-inc/nebula-go/v2" nebulaType "github.com/vesoft-inc/nebula-go/v2/nebula" diff --git a/service/pool/pool.go b/service/pool/pool.go index bdb15f0..0e3972e 100644 --- a/service/pool/pool.go +++ b/service/pool/pool.go @@ -6,7 +6,7 @@ import ( "sync" "time" - common "nebula-http-gateway/utils" + "github.com/vesoft-inc/nebula-http-gateway/common" "github.com/facebook/fbthrift/thrift/lib/go/thrift" uuid "github.com/satori/go.uuid" From ae6c6df2ddba13ad9fc0939c389a81fef6e0d61e Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Thu, 22 Jul 2021 11:47:08 +0800 Subject: [PATCH 2/2] Fix package --- controllers/db_test.go | 2 +- main.go | 2 -- service/pool/pool.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/db_test.go b/controllers/db_test.go index b589ea9..15abf25 100644 --- a/controllers/db_test.go +++ b/controllers/db_test.go @@ -1,4 +1,4 @@ -package tests +package controllers import ( "bytes" diff --git a/main.go b/main.go index 804bf06..3d0767e 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,6 @@ package main import ( - _ "github.com/vesoft-inc/nebula-http-gateway/routers" - "github.com/astaxie/beego" ) diff --git a/service/pool/pool.go b/service/pool/pool.go index 0e3972e..e5d7e75 100644 --- a/service/pool/pool.go +++ b/service/pool/pool.go @@ -6,9 +6,9 @@ import ( "sync" "time" + "github.com/facebook/fbthrift/thrift/lib/go/thrift" "github.com/vesoft-inc/nebula-http-gateway/common" - "github.com/facebook/fbthrift/thrift/lib/go/thrift" uuid "github.com/satori/go.uuid" nebula "github.com/vesoft-inc/nebula-go/v2" )