mirror of
https://github.com/Sosokker/openweathermap-dashboard.git
synced 2025-12-18 21:54:05 +01:00
feat: add primary struct
This commit is contained in:
commit
a112758bfd
3
cmd/go.mod
Normal file
3
cmd/go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module github.com/Sosokker/openweather-dashboard
|
||||||
|
|
||||||
|
go 1.23.5
|
||||||
25
cmd/main.go
Normal file
25
cmd/main.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
type Coordinate struct {
|
||||||
|
Lon float32 `json:"lon"`
|
||||||
|
Lat float32 `json:"lat"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Weather struct {
|
||||||
|
Id int `json:"id"`
|
||||||
|
Main string `json:"main"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type DataEntry struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Coord Coordinate
|
||||||
|
Weather Weather
|
||||||
|
Rain struct {
|
||||||
|
PerHour float64 `json:"1h"`
|
||||||
|
} `json:"rain"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user