Implement default precision=0 for upstream weatherapi endpoints

This commit is contained in:
2026-07-02 11:39:17 -05:00
parent 27506168f8
commit 7f989839cd
6 changed files with 15 additions and 5 deletions

View File

@@ -28,6 +28,9 @@ func TestDefaults(t *testing.T) {
if cfg.WeatherAPI.Format != "json" {
t.Fatalf("Format = %q, want json", cfg.WeatherAPI.Format)
}
if cfg.WeatherAPI.Precision != 0 {
t.Fatalf("Precision = %d, want 0", cfg.WeatherAPI.Precision)
}
if cfg.Location.ID != "home" || cfg.Location.Name != "Brentwood" || cfg.Location.Region != "St. Louis Metro" {
t.Fatalf("Location = %#v, want home/Brentwood/St. Louis Metro", cfg.Location)
}