diff --git a/tools/goctl/api/parser/g4/ast/apiparser.go b/tools/goctl/api/parser/g4/ast/apiparser.go index b19ba666..89aadb0d 100644 --- a/tools/goctl/api/parser/g4/ast/apiparser.go +++ b/tools/goctl/api/parser/g4/ast/apiparser.go @@ -253,7 +253,7 @@ func (p *Parser) duplicateRouteCheck(nestedApi *Api, mainHandlerMap, mainRouteMa prefix = p.Text() } g := each.AtServer.Kv.Get(groupKey) - if p != nil { + if g != nil { group = g.Text() } }