now using using
This commit is contained in:
		
							parent
							
								
									ca8d1893db
								
							
						
					
					
						commit
						cc8136fb53
					
				
							
								
								
									
										17
									
								
								main.odin
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								main.odin
									
									
									
									
									
								
							@ -58,16 +58,17 @@ main :: proc() {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	weather_location := weather.name
 | 
						weather_location := weather.name
 | 
				
			||||||
	weather_code := weather.sys.country
 | 
						weather_code := weather.country
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	weather_resp := weather.weather[0].main
 | 
						weather_resp := weather.weather[0].main
 | 
				
			||||||
	weather_resp_detail := weather.weather[0].description
 | 
						weather_resp_detail := weather.weather[0].description
 | 
				
			||||||
	//weather_icon := weather.weather[0].icon
 | 
					
 | 
				
			||||||
	temperature := weather.main.temp
 | 
						temperature := weather.temp
 | 
				
			||||||
	feels_like_temp := weather.main.feels_like
 | 
						feels_like_temp := weather.feels_like
 | 
				
			||||||
	temp_min := weather.main.temp_min
 | 
						temp_min := weather.temp_min
 | 
				
			||||||
	temp_max := weather.main.temp_max
 | 
						temp_max := weather.temp_max
 | 
				
			||||||
	sunset_time := time.to_string_hms_12(time.unix(weather.sys.sunset, 0), buf1[:])
 | 
						sunset_time := time.to_string_hms_12(time.unix(weather.sunset, 0), buf1[:])
 | 
				
			||||||
	sunrise_time := time.to_string_hms_12(time.unix(weather.sys.sunrise, 0), buf2[:])
 | 
						sunrise_time := time.to_string_hms_12(time.unix(weather.sunrise, 0), buf2[:])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fmt.println("Location:", weather_location)
 | 
						fmt.println("Location:", weather_location)
 | 
				
			||||||
	fmt.println("Country Code:", weather_code)
 | 
						fmt.println("Country Code:", weather_code)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										10
									
								
								weather.odin
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								weather.odin
									
									
									
									
									
								
							@ -44,17 +44,17 @@ Visibility :: struct {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WeatherResponse :: struct {
 | 
					WeatherResponse :: struct {
 | 
				
			||||||
	clouds:     Clouds,
 | 
						using clouds: Clouds,
 | 
				
			||||||
	sys:        Sys,
 | 
						using sys:    Sys,
 | 
				
			||||||
	name:         string,
 | 
						name:         string,
 | 
				
			||||||
	base:         string,
 | 
						base:         string,
 | 
				
			||||||
	coord:      Coord,
 | 
						using coord:  Coord,
 | 
				
			||||||
	timezone:     int,
 | 
						timezone:     int,
 | 
				
			||||||
	weather:      []Weather,
 | 
						weather:      []Weather,
 | 
				
			||||||
	main:       Main,
 | 
						using main:   Main,
 | 
				
			||||||
	visibility:   int,
 | 
						visibility:   int,
 | 
				
			||||||
	dt:           f64,
 | 
						dt:           f64,
 | 
				
			||||||
	id:           int,
 | 
						id:           int,
 | 
				
			||||||
	wind:       Wind,
 | 
						using wind:   Wind,
 | 
				
			||||||
	cod:          int,
 | 
						cod:          int,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user