This is a slight twist on similar posts.
I have a package called data that has the following:
type CityCoords struct {
Name string
Lat float64
Long float64
}
type Country struct {
Name string
Capitol *CityCoords
}
In my main function I try initializing a Country like so:
germany := data.Country {
Name: "Germany",
Capitol: {
Name: "Berlin", //error is on this line
Lat: 52.5200,
Long: 13.4050,
},
}
When I build my project, I get this error aligned with the "Name" attributed as I've flagged above:
missing type in composite literal
How do I resolve this error?