(goctl): support nested struct (#4211)

This commit is contained in:
kesonan
2024-06-25 23:18:15 +08:00
committed by GitHub
parent 4ec9cac82b
commit a012a9138f
28 changed files with 318 additions and 76 deletions

View File

@@ -30,6 +30,11 @@ func (t DefineStruct) Documents() []string {
return t.Docs
}
// IsNestedStruct returns whether the structure is nested.
func (t DefineStruct) IsNestedStruct() bool {
return len(t.Members) > 0
}
// Name returns a map string, such as map[string]int
func (t MapType) Name() string {
return t.RawName