oldme

Results 15 comments of oldme

@gqcn AST is slower than Regex after testing. Why `gen service`, sensitive to generating time duration.

``` func BenchmarkOfAST(b *testing.B) { for i := 0; i < b.N; i++ { utils.GetStructs("./file.go") } } func BenchmarkOfRegex(b *testing.B) { PatternApiDefinition := `type\s+(\w+)Req\s+struct\s+{([\s\S]+?)}` for i := 0; i <...

@gqcn AST is slower than Regex, but the 'gf gen' command scans all files after changing one file. This slows down the file generation process. If we make improvements and...

@gqcn 很多 issue 都提到了 gf gen 匹配不精确的问题,已经是月经贴了,所以我关闭了所有此类的问题,统一提到这里讨论。 正则无法适应五花八门的各类代码,在无法替换成 AST 的情况下,当前我能想到的好办法:在文档中去引导 api 和 sevice 的规范

test code: ``` func TestA(t *testing.T) { db.SetDebug(true) var ( num = 5 wg = sync.WaitGroup{} ) wg.Add(num) for i := 0; i < num; i++ { go func(i int)...

@houseme 暂时还没有想到,讨论一下

@gqcn First, please upload `loads/mariadb:10.4`

> > fixed #2746 > > **Dear reviewer:** 修复 mariaDb `gf gen dao` 的 `json` 字段识别为 `string` 问题 > > # 实现说明 > > 在 `mysql driver` 中增加对 `mariaDb` 的识别,**如果是,则使用...

Could you provide the basic code?