From 863f31731316d64f65f6114dee862885d26a68d7 Mon Sep 17 00:00:00 2001 From: Simon Wang Date: Thu, 11 Aug 2022 13:44:16 +0800 Subject: [PATCH] fix: fix frugal tag for typedef container (#54) --- generator/golang/frugal.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generator/golang/frugal.go b/generator/golang/frugal.go index fb9d5aaf..29efffb9 100644 --- a/generator/golang/frugal.go +++ b/generator/golang/frugal.go @@ -59,10 +59,11 @@ func (r *FrugalResolver) getTypeName(g *Scope, t *parser.Type) (name string, err if _, ok := baseTypes[t.Name]; ok { return t.Name, nil } - if isContainerTypes[t.Name] { + g, ut, name := getUnderlay(g, t) + t = ut + if isContainerTypes[name] { return r.getContainerTypeName(g, t) } - g, ut, name := getUnderlay(g, t) if name == "" { return "", fmt.Errorf("getTypeName failed: type[%v] file[%s]", t, g.ast.Filename)