Can not convert inline struct correctly
Closed this issue · 2 comments
p1ass commented
Issue
I would like to convert the code below.
package foo
type foo struct{
id int `json:"id"`
bar struct{
id int `json:"bar_id"`
} `json:"bar"`
}
However, the output contains struct tag data.
package "foo" {
class "foo" as foo.foo <<V,Orchid>> {
-id: int
-bar: struct{id int "json:\"bar_id\""}
}
}
I think this is because that types.Struct
has not only field data, but also tag data like,
&types.Struct{
fields:[]*types.Var{(*types.Var)(0xc0000ee3c0)},
tags:[]string{"json:\"bar_id\""}
}
Therefore, when we use types.Struct.String()
, unnecessary information is showed.
kazukousen commented
kazukousen commented