now using using

This commit is contained in:
Simon Kellet 2025-02-27 19:00:11 +00:00
parent ca8d1893db
commit cc8136fb53
2 changed files with 22 additions and 21 deletions

View File

@ -58,16 +58,17 @@ main :: proc() {
}
weather_location := weather.name
weather_code := weather.sys.country
weather_code := weather.country
weather_resp := weather.weather[0].main
weather_resp_detail := weather.weather[0].description
//weather_icon := weather.weather[0].icon
temperature := weather.main.temp
feels_like_temp := weather.main.feels_like
temp_min := weather.main.temp_min
temp_max := weather.main.temp_max
sunset_time := time.to_string_hms_12(time.unix(weather.sys.sunset, 0), buf1[:])
sunrise_time := time.to_string_hms_12(time.unix(weather.sys.sunrise, 0), buf2[:])
temperature := weather.temp
feels_like_temp := weather.feels_like
temp_min := weather.temp_min
temp_max := weather.temp_max
sunset_time := time.to_string_hms_12(time.unix(weather.sunset, 0), buf1[:])
sunrise_time := time.to_string_hms_12(time.unix(weather.sunrise, 0), buf2[:])
fmt.println("Location:", weather_location)
fmt.println("Country Code:", weather_code)

View File

@ -44,17 +44,17 @@ Visibility :: struct {
}
WeatherResponse :: struct {
clouds: Clouds,
sys: Sys,
name: string,
base: string,
coord: Coord,
timezone: int,
weather: []Weather,
main: Main,
visibility: int,
dt: f64,
id: int,
wind: Wind,
cod: int,
using clouds: Clouds,
using sys: Sys,
name: string,
base: string,
using coord: Coord,
timezone: int,
weather: []Weather,
using main: Main,
visibility: int,
dt: f64,
id: int,
using wind: Wind,
cod: int,
}