feat: update NewWrapperClient
This commit is contained in:
@ -11,14 +11,15 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"git.zhangdeman.cn/zhangdeman/consts"
|
"git.zhangdeman.cn/zhangdeman/consts"
|
||||||
"git.zhangdeman.cn/zhangdeman/database/abstract"
|
"git.zhangdeman.cn/zhangdeman/database/abstract"
|
||||||
"git.zhangdeman.cn/zhangdeman/database/define"
|
"git.zhangdeman.cn/zhangdeman/database/define"
|
||||||
"git.zhangdeman.cn/zhangdeman/serialize"
|
"git.zhangdeman.cn/zhangdeman/serialize"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
@ -32,7 +33,7 @@ func init() {
|
|||||||
WrapperClient = NewWrapperClient()
|
WrapperClient = NewWrapperClient()
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewWrapperClient() *wrapperClient {
|
func NewWrapperClient() abstract.IWrapperClient {
|
||||||
return &wrapperClient{
|
return &wrapperClient{
|
||||||
lock: &sync.RWMutex{},
|
lock: &sync.RWMutex{},
|
||||||
clientTable: make(map[string]abstract.IWrapperDatabaseClient),
|
clientTable: make(map[string]abstract.IWrapperDatabaseClient),
|
||||||
|
Reference in New Issue
Block a user