I have a nested struct
type Posts struct {
Id int
CreatedAt time.Time
Data struct {
Title string
UserName string
}
}
I want to create a Data object but var innerData Posts.Data
doesn't seem to work. I don't want to create separate Data struct
because I'm planning to avoid name collusions by having multiple structs which will have different inner structs named Data.