From 5b8ba0122d2e7085b8476ae46097add565a06d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A5rek=20Andreassen?= Date: Tue, 24 Sep 2024 22:08:36 +0200 Subject: [PATCH] chore: Rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim HĂ„rek Andreassen --- internal/met/met.go | 4 ++-- internal/met/types.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/met/met.go b/internal/met/met.go index cec8ca8..9482d9b 100644 --- a/internal/met/met.go +++ b/internal/met/met.go @@ -21,7 +21,7 @@ func New(siteName string) (*Met, error) { }, nil } -func (m *Met) Forecast(lat, lon float64, alt *int) (*LocationforecastResult, error) { +func (m *Met) Forecast(lat, lon float64, alt *int) (*LocationForecastResult, error) { url := fmt.Sprintf("https://api.met.no/weatherapi/locationforecast/2.0/complete?lat=%.4f&lon=%.4f&altitude=%d", lat, lon, alt) req, err := http.NewRequest("GET", url, nil) @@ -45,7 +45,7 @@ func (m *Met) Forecast(lat, lon float64, alt *int) (*LocationforecastResult, err return nil, err } - forecast := LocationforecastResult{} + forecast := LocationForecastResult{} err = json.Unmarshal(body, &forecast) if err != nil { return nil, err diff --git a/internal/met/types.go b/internal/met/types.go index 4dceab2..c9f3433 100644 --- a/internal/met/types.go +++ b/internal/met/types.go @@ -7,7 +7,7 @@ type cacheInfo struct { LastModified time.Time `json:"lastModified"` } -type LocationforecastResult struct { +type LocationForecastResult struct { Type string `json:"type"` Geometry struct {