Skip to content

Commit

Permalink
Merge pull request #259 from golanglemonade/fix-any-alias
Browse files Browse the repository at this point in the history
fix type.Alias for any fields
  • Loading branch information
Yamashou authored Dec 23, 2024
2 parents 10e03ee + 1f5bb8b commit 4e639ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clientgenv2/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func (g *GenGettersGenerator) returnTypeName(t types.Type, nested bool) string {
return "any"
case *types.Map:
return "map[" + g.returnTypeName(it.Key(), true) + "]" + g.returnTypeName(it.Elem(), true)
case *types.Alias:
return g.returnTypeName(it.Underlying(), nested)
default:
return fmt.Sprintf("%T----", it)
}
Expand Down

0 comments on commit 4e639ec

Please sign in to comment.