Browse Source

调整目录结构

marion 5 years ago
parent
commit
587a4ff634

+ 3 - 3
README.md

@@ -48,7 +48,7 @@ export PATH="${GOROOT}/bin:${PATH}"
    
 ### 获取
 
-> go get -v -insecure -d git.haoqitour.com/haoqi/go-common
+> go get -v -insecure -d git.aionnect.com/aionnect/go-common
 
 参数:-v 显示详情,-insecure 非https版本仓库路径,-d 仅获取,不编译安装到GOPATH
 
@@ -68,11 +68,11 @@ Power Shell 或 Windows CMD (需要用管理员身份运行):
 
 **注意,Windows Power Shell打开后首先输入cmd进入Windows CMD,下同不再累述**
 
-> mklink /D %USERPROFILE%\Documents\project\haoqitour\go-common %GOPATH%\src\git.haoqitour.com\haoqi\go-common
+> mklink /D %USERPROFILE%\Documents\project\haoqitour\go-common %GOPATH%\src\git.aionnect.com\haoqi\go-common
 
 **MAC OS X**
 
-> sudo ln -s $GOPATH/src/git.haoqitour.com/haoqi/go-common/ ~/Documents/project/haoqitour/go-common
+> sudo ln -s $GOPATH/src/git.aionnect.com/aionnect/go-common/ ~/Documents/project/haoqitour/go-common
 
 ## 相关依赖
 

+ 2 - 2
main.go

@@ -2,7 +2,7 @@ package main
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils"
 	"strconv"
 )
 
@@ -99,4 +99,4 @@ func decimalToAny(num int, n int) string {
 		num = num / n
 	}
 	return new_num_str
-}
+}

+ 1 - 1
utils/goroutine_recover.go

@@ -1,7 +1,7 @@
 package utils
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
 	"log"
 )
 

+ 1 - 1
utils/http_middleware/gin_core.go

@@ -2,7 +2,7 @@ package http_middleware
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils/jws"
+	"git.aionnect.com/aionnect/go-common/utils/jws"
 	"github.com/gin-gonic/gin"
 	"regexp"
 	"strings"

+ 2 - 2
utils/http_middleware/gin_logger.go

@@ -3,8 +3,8 @@ package http_middleware
 import (
 	"bytes"
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils/date"
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils/date"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
 	"github.com/gin-gonic/gin"
 	"io"
 	"io/ioutil"

+ 3 - 3
utils/http_middleware/gin_recovery.go

@@ -2,9 +2,9 @@ package http_middleware
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
-	"git.haoqitour.com/haoqi/go-common/utils/date"
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils/date"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
 	"github.com/gin-gonic/gin"
 	"github.com/json-iterator/go"
 	"net/http"

+ 1 - 1
utils/jws/gin_jwt.go

@@ -1,7 +1,7 @@
 package jws
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils"
 	"github.com/gin-gonic/gin"
 	"net/http"
 )

+ 2 - 2
utils/logger/logger.go

@@ -178,8 +178,8 @@ func (logger *Logger) WithCaller(skip int) *Logger {
 	}
 	for i := 0; i < 100; i++ {
 		if _, file, line, ok := runtime.Caller(i); ok {
-			if strings.Contains(file, "git.haoqitour.com") &&
-				!strings.Contains(file, "git.haoqitour.com/haoqi/go-common/utils/logger") {
+			if strings.Contains(file, "git.aionnect.com") &&
+				!strings.Contains(file, "git.aionnect.com/aionnect/go-common/utils/logger") {
 				return logger.
 					WithField("codeline", fmt.Sprintf("%s:%d", file, line))
 				//WithField("func", runtime.FuncForPC(pc).Name())

+ 2 - 2
utils/mq/kafka/consumer.go

@@ -2,8 +2,8 @@ package kafka
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
 	"github.com/Shopify/sarama"
 	"github.com/bsm/sarama-cluster"
 	"github.com/json-iterator/go"

+ 3 - 3
utils/mq/kafka/consumer_test.go

@@ -2,9 +2,9 @@ package kafka
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
-	"git.haoqitour.com/haoqi/go-common/utils/mq/topic"
+	"git.aionnect.com/aionnect/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils/mq/topic"
 	"sync"
 	"testing"
 )

+ 3 - 3
utils/mq/kafka/producer.go

@@ -2,9 +2,9 @@ package kafka
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
 	"github.com/Shopify/sarama"
 	"github.com/json-iterator/go"
 	"github.com/spf13/viper"

+ 3 - 3
utils/mq/kafka/producer_test.go

@@ -1,9 +1,9 @@
 package kafka
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils/date"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
-	"git.haoqitour.com/haoqi/go-common/utils/mq/topic"
+	"git.aionnect.com/aionnect/go-common/utils/date"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils/mq/topic"
 	"testing"
 )
 

+ 1 - 1
utils/mq/nats/consumer.go

@@ -1,7 +1,7 @@
 package nats
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
 	"github.com/nats-io/go-nats"
 	"github.com/spf13/viper"
 	"time"

+ 2 - 2
utils/mq/nats/consumer_test.go

@@ -2,8 +2,8 @@ package nats
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
-	"git.haoqitour.com/haoqi/go-common/utils/mq/topic"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils/mq/topic"
 	"sync"
 	"testing"
 )

+ 2 - 2
utils/mq/nats/producer.go

@@ -1,8 +1,8 @@
 package nats
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils/logger"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils/logger"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
 	"github.com/nats-io/go-nats"
 	"github.com/spf13/viper"
 	"time"

+ 3 - 3
utils/mq/nats/producer_test.go

@@ -1,9 +1,9 @@
 package nats
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils/date"
-	"git.haoqitour.com/haoqi/go-common/utils/mq"
-	"git.haoqitour.com/haoqi/go-common/utils/mq/topic"
+	"git.aionnect.com/aionnect/go-common/utils/date"
+	"git.aionnect.com/aionnect/go-common/utils/mq"
+	"git.aionnect.com/aionnect/go-common/utils/mq/topic"
 	"testing"
 )
 

+ 1 - 1
utils/mq/test_message.go

@@ -1,6 +1,6 @@
 package mq
 
-import "git.haoqitour.com/haoqi/go-common/utils/date"
+import "git.aionnect.com/aionnect/go-common/utils/date"
 
 type TestMsg struct {
 	Message string        `json:"message"`

+ 1 - 1
utils/queue/buffer_postman.go

@@ -1,7 +1,7 @@
 package queue
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils"
 	"sync"
 	"time"
 )

+ 1 - 1
utils/queue/buffer_postman_test.go

@@ -2,7 +2,7 @@ package queue
 
 import (
 	"fmt"
-	"git.haoqitour.com/haoqi/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils"
 	"testing"
 	"time"
 )

+ 1 - 1
utils/queue/chan_pool.go

@@ -1,7 +1,7 @@
 package queue
 
 import (
-	"git.haoqitour.com/haoqi/go-common/utils"
+	"git.aionnect.com/aionnect/go-common/utils"
 	"os"
 	"os/signal"
 	"syscall"