mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
整理代码
This commit is contained in:
@@ -7,6 +7,10 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultDatabaseDir = "./data/database"
|
||||
)
|
||||
|
||||
func NewManage(cfg *ManageConfig, op ...client.Option) (*Manage, error) {
|
||||
//初始化配置
|
||||
if cfg == nil {
|
||||
@@ -16,10 +20,10 @@ func NewManage(cfg *ManageConfig, op ...client.Option) (*Manage, error) {
|
||||
cfg.Hosts = Hosts
|
||||
}
|
||||
if cfg.CodesDir == "" {
|
||||
cfg.CodesDir = "./data/database"
|
||||
cfg.CodesDir = DefaultDatabaseDir
|
||||
}
|
||||
if cfg.WorkdayDir == "" {
|
||||
cfg.WorkdayDir = "./data/database"
|
||||
cfg.WorkdayDir = DefaultDatabaseDir
|
||||
}
|
||||
|
||||
//代码
|
||||
|
||||
Reference in New Issue
Block a user