1 Star 0 Fork 3

神都花已开/fate

forked from wukong/fate 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fate_test.go 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
godcong 提交于 2020-02-06 02:05 . update fate
package fate_test
import (
"context"
"github.com/godcong/chronos"
"github.com/godcong/fate"
"github.com/godcong/fate/config"
"testing"
)
func init() {
//trait.NewZapFileSugar("fate.log")
}
func TestFate_RunMakeName(t *testing.T) {
born := chronos.New("2020/02/06 15:45").Solar().Time()
last := "张"
cfg := config.DefaultConfig()
cfg.BaguaFilter = true
cfg.ZodiacFilter = true
cfg.SupplyFilter = true
cfg.HardFilter = true
cfg.StrokeMin = 3
cfg.StrokeMax = 24
cfg.Regular = true
cfg.RunInit = false
cfg.FileOutput = config.FileOutput{
OutputMode: config.OutputModeLog,
Path: "name.log",
}
cfg.Database = config.Database{
Host: "localhost",
Port: "3306",
User: "root",
Pwd: "111111",
Name: "fate",
MaxIdleCon: 0,
MaxOpenCon: 0,
Driver: "mysql",
File: "",
Dsn: "",
ShowSQL: false,
ShowExecTime: false,
}
f := fate.NewFate(last, born, fate.ConfigOption(cfg), fate.SexOption(fate.SexGirl))
//f.SetDB(eng)
e := f.MakeName(context.Background())
if e != nil {
t.Fatal(e)
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chen29011/fate.git
git@gitee.com:chen29011/fate.git
chen29011
fate
fate
master

搜索帮助