-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweather.go
44 lines (32 loc) · 927 Bytes
/
weather.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package weathermodule_v2
//
type Weather struct {
id int64
main string
description string
iconUrl string
}
//
func (currentWeather *Weather) InitializeWeather(idValue int64, mainValue string, descriptionValue string, icon string) {
//return &Weather{id: idValue, main: mainValue, description: descriptionValue, iconUrl: "https://openweathermap.org/img/wn/" + icon + ".png"}
currentWeather.id = idValue
currentWeather.main = mainValue
currentWeather.description = descriptionValue
currentWeather.iconUrl = "https://openweathermap.org/img/wn/" + icon + ".png"
}
//
func (currentWeather *Weather) GetId() int64 {
return currentWeather.id
}
//
func (currentWeather *Weather) GetMain() string {
return currentWeather.main
}
//
func (currentWeather *Weather) GetDescription() string {
return currentWeather.description
}
//
func (currentWeather *Weather) GetIconUrl() string {
return currentWeather.iconUrl
}