change module name
This commit is contained in:
parent
f21ddce0c8
commit
9de6bda75b
@ -14,7 +14,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gfile"
|
"git.hexq.cn/tiglog/golib/gfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type cAir struct {
|
type cAir struct {
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
"github.com/casbin/casbin/v2"
|
"github.com/casbin/casbin/v2"
|
||||||
"github.com/go-redis/redis/v8"
|
"github.com/go-redis/redis/v8"
|
||||||
"hexq.cn/tiglog/golib/gcasbin"
|
"git.hexq.cn/tiglog/golib/gcasbin"
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getRedis() *redis.Client {
|
func getRedis() *redis.Client {
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/casbin/casbin/v2/util"
|
"github.com/casbin/casbin/v2/util"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"hexq.cn/tiglog/golib/gcasbin"
|
"git.hexq.cn/tiglog/golib/gcasbin"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -12,10 +12,10 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gfile"
|
"git.hexq.cn/tiglog/golib/gfile"
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
"hexq.cn/tiglog/golib/helper"
|
"git.hexq.cn/tiglog/golib/helper"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BaseConfig struct {
|
type BaseConfig struct {
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
"hexq.cn/tiglog/golib/gfile"
|
"git.hexq.cn/tiglog/golib/gfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ParamConfig struct {
|
type ParamConfig struct {
|
||||||
|
@ -12,8 +12,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"hexq.cn/tiglog/golib/gdb/mgodb"
|
"git.hexq.cn/tiglog/golib/gdb/mgodb"
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initMM() {
|
func initMM() {
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
"hexq.cn/tiglog/golib/gdb/sqldb"
|
"git.hexq.cn/tiglog/golib/gdb/sqldb"
|
||||||
// _ "github.com/go-sql-driver/mysql"
|
// _ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gdb/sqldb"
|
"git.hexq.cn/tiglog/golib/gdb/sqldb"
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 经过测试,发现数据库里面使用 time 类型容易出现 timezone 不一致的情况
|
// 经过测试,发现数据库里面使用 time 类型容易出现 timezone 不一致的情况
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gdb/sqldb"
|
"git.hexq.cn/tiglog/golib/gdb/sqldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func dbQueryTest(db *sqldb.Engine, t *testing.T) {
|
func dbQueryTest(db *sqldb.Engine, t *testing.T) {
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module hexq.cn/tiglog/golib
|
module git.hexq.cn/tiglog/golib
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gqueue"
|
"git.hexq.cn/tiglog/golib/gqueue"
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestClient(t *testing.T) {
|
func TestClient(t *testing.T) {
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
"hexq.cn/tiglog/golib/helper"
|
"git.hexq.cn/tiglog/golib/helper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAnyToInt(t *testing.T) {
|
func TestAnyToInt(t *testing.T) {
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/rs/xid"
|
"github.com/rs/xid"
|
||||||
"hexq.cn/tiglog/golib/crypto/gmd5"
|
"git.hexq.cn/tiglog/golib/crypto/gmd5"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 是否是字符串
|
// 是否是字符串
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
"hexq.cn/tiglog/golib/helper"
|
"git.hexq.cn/tiglog/golib/helper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIsString(t *testing.T) {
|
func TestIsString(t *testing.T) {
|
||||||
|
@ -10,8 +10,8 @@ package logger_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
"hexq.cn/tiglog/golib/logger"
|
"git.hexq.cn/tiglog/golib/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLogToFile(t *testing.T) {
|
func TestLogToFile(t *testing.T) {
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"hexq.cn/tiglog/golib/logger"
|
"git.hexq.cn/tiglog/golib/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GinLogger() gin.HandlerFunc {
|
func GinLogger() gin.HandlerFunc {
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"hexq.cn/tiglog/golib/helper"
|
"git.hexq.cn/tiglog/golib/helper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewCors(origins []string) gin.HandlerFunc {
|
func NewCors(origins []string) gin.HandlerFunc {
|
||||||
|
@ -14,8 +14,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
"hexq.cn/tiglog/golib/middleware"
|
"git.hexq.cn/tiglog/golib/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestRouter(origins []string) *gin.Engine {
|
func newTestRouter(origins []string) *gin.Engine {
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"hexq.cn/tiglog/golib/logger"
|
"git.hexq.cn/tiglog/golib/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GinRecover() gin.HandlerFunc {
|
func GinRecover() gin.HandlerFunc {
|
||||||
|
@ -18,8 +18,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hexq.cn/tiglog/golib/gtest"
|
"git.hexq.cn/tiglog/golib/gtest"
|
||||||
"hexq.cn/tiglog/golib/storage"
|
"git.hexq.cn/tiglog/golib/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getLocalStorage() *storage.Engine {
|
func getLocalStorage() *storage.Engine {
|
||||||
|
Loading…
Reference in New Issue
Block a user