From c219f5b9351f84a68d8ccc05e7f2798be40d4820 Mon Sep 17 00:00:00 2001 From: lbbniu Date: Wed, 31 Aug 2022 18:55:23 +0800 Subject: [PATCH] fix(bug): Single-file multi-module code generation function name is assigned multiple times --- tars/tools/tars2go/gen_go.go | 3 +-- tars/tools/tars2go/version.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tars/tools/tars2go/gen_go.go b/tars/tools/tars2go/gen_go.go index c3c0d5e6..e1113e54 100755 --- a/tars/tools/tars2go/gen_go.go +++ b/tars/tools/tars2go/gen_go.go @@ -183,6 +183,7 @@ func (gen *GenGo) genAll() { // already compiled return } + gFileMap[gen.path] = true gen.p.rename() gen.genInclude(gen.p.IncParse) @@ -207,8 +208,6 @@ func (gen *GenGo) genAll() { for _, v := range gen.p.Interface { gen.genInterface(&v) } - - gFileMap[gen.path] = true } func (gen *GenGo) genErr(err string) { diff --git a/tars/tools/tars2go/version.go b/tars/tools/tars2go/version.go index 3e7b44e2..17517c75 100644 --- a/tars/tools/tars2go/version.go +++ b/tars/tools/tars2go/version.go @@ -1,4 +1,4 @@ package main // VERSION of the tars2go tools. -const VERSION = "1.1.8" +const VERSION = "1.1.9"