feat:完善项目信息
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"gopkg.in/yaml.v2"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@ -76,7 +77,12 @@ func run() {
|
||||
orm.WithSqliteOption(&logic.Sqlite{Path: _sqlite.Path, Name: _sqlite.Name}),
|
||||
).Init()
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
fmt.Println("========================\n=== 数据引擎创建成功 ===\n========================")
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
// 迁移数据
|
||||
migrate.NewInstance(migrate.WithGormDBOption(engine.Engine)).Handle()
|
||||
|
||||
@ -94,7 +100,9 @@ func run() {
|
||||
fmt.Errorf("数据初始化文件错误:%v", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("========================\n=== 数据初始化成功 ===\n========================")
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
fmt.Println("========================\n=== 数据初始化完成 ===\n========================")
|
||||
}
|
||||
|
||||
func saveFile(_file string, data *Config) error {
|
||||
|
Reference in New Issue
Block a user