feat:完善项目信息

This commit is contained in:
henry
2022-01-11 14:54:20 +08:00
parent 8006d57506
commit 72c2cb091d
15 changed files with 299 additions and 38 deletions

View File

@ -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 {