How to properly initialize a nested struct in Go?
Hi everyone! I'm a beginner in Go, and I have a problem with initializing nested structs. I'm writing a small project for working with a weather API.
I have these structs:
```go
type WeatherResponse struct {
Location Location
Current CurrentWeather
}
type Location struct {
Name string
Country string
Lat float64
Lon float64
}
type CurrentWeather struct {
Temperature float64
Humidity int
Condition string
Wind WindInfo
}
type WindInfo struct {
Speed float64
Deg int
}
```
I'm trying to create an instance of `WeatherResponse` and fill all fields at once, but I get compilation errors. I tried different options:
```go
// Option 1 - doesn't work
data := WeatherResponse{
Location.Name: "Moscow