(goctl): fix nested struct generation (#4281)

This commit is contained in:
kesonan
2024-07-28 23:40:25 +08:00
committed by GitHub
parent eeda6efae7
commit ee643a945e
6 changed files with 32 additions and 17 deletions

View File

@@ -63,8 +63,8 @@ func writeProperty(writer io.Writer, name, tag, comment string, tp spec.Type, in
err error
isNestedStruct bool
)
structType, ok := tp.(spec.DefineStruct)
if ok && structType.IsNestedStruct() {
structType, ok := tp.(spec.NestedStruct)
if ok {
isNestedStruct = true
}
if len(comment) > 0 {