yr/cmd/yr.go
Tim Hårek Andreassen 7866a4e087
Initial commit
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-09-24 20:38:24 +02:00

29 lines
409 B
Go

package main
import (
"encoding/json"
"fmt"
"git.sr.ht/~timharek/yr-go/internal/met"
)
func main() {
m, err := met.New("git.sr.ht/~timharek/yr-go")
if err != nil {
fmt.Println(err)
return
}
forecast, err := m.Forecast(60.389444, 5.33, nil)
if err != nil {
fmt.Println(err)
return
}
f, err := json.Marshal(forecast)
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("%s", f)
}