Update outlook dependency for v2 compile boundary

This commit is contained in:
2026-06-12 12:52:05 +00:00
parent 0135eb1153
commit 14c6954296
13 changed files with 9 additions and 40 deletions

View File

@@ -41,9 +41,6 @@ func mapOutlookRow(row outlookRow) (model.WeatherOutlook, error) {
IssuedAt: row.IssuedAt.UTC(),
ExpiresAt: row.ExpiresAt.UTC(),
Forecaster: stringValue(row.Forecaster),
Headline: stringValue(row.Headline),
Summary: stringValue(row.Summary),
Discussion: stringValue(row.Discussion),
SourceURL: stringValue(row.SourceURL),
ImageURL: stringValue(row.ImageURL),
ContainsLocation: row.ContainsLocation,

View File

@@ -79,9 +79,6 @@ func TestMapOutlookRowMapsFields(t *testing.T) {
IssuedAt: issuedAt,
ExpiresAt: expiresAt,
Forecaster: sql.NullString{String: "DIAL", Valid: true},
Headline: sql.NullString{String: "Severe storms possible", Valid: true},
Summary: sql.NullString{String: "Scattered severe storms are possible.", Valid: true},
Discussion: sql.NullString{String: "Discussion text.", Valid: true},
SourceURL: sql.NullString{String: "https://www.spc.noaa.gov/products/outlook/day1otlk.html", Valid: true},
ImageURL: sql.NullString{String: "https://www.spc.noaa.gov/products/outlook/day1otlk.gif", Valid: true},
ContainsLocation: true,
@@ -103,8 +100,8 @@ func TestMapOutlookRowMapsFields(t *testing.T) {
if outlook.SeverityRank == nil || *outlook.SeverityRank != int(severityRank) {
t.Fatalf("expected severity rank %d, got %v", severityRank, outlook.SeverityRank)
}
if outlook.Forecaster != "DIAL" || outlook.Headline == "" || outlook.Summary == "" || outlook.Discussion == "" {
t.Fatalf("unexpected text fields: %+v", outlook)
if outlook.Forecaster != "DIAL" {
t.Fatalf("unexpected forecaster: %+v", outlook)
}
if outlook.SourceURL == "" || outlook.ImageURL == "" {
t.Fatalf("expected source and image URLs: %+v", outlook)
@@ -142,8 +139,7 @@ func TestMapOutlookRowMissingOptionals(t *testing.T) {
t.Fatalf("unexpected error: %v", err)
}
if outlook.LabelText != "" || outlook.Forecaster != "" || outlook.Headline != "" ||
outlook.Summary != "" || outlook.Discussion != "" || outlook.SourceURL != "" || outlook.ImageURL != "" {
if outlook.LabelText != "" || outlook.Forecaster != "" || outlook.SourceURL != "" || outlook.ImageURL != "" {
t.Fatalf("expected optional strings to map to empty values, got %+v", outlook)
}
if outlook.SeverityRank != nil {

View File

@@ -32,9 +32,6 @@ SELECT
issued_at,
expires_at,
forecaster,
headline,
summary,
discussion,
source_url,
image_url,
contains_location,

View File

@@ -68,9 +68,6 @@ func (r *Repository) loadOutlooks(ctx context.Context, eventID string) ([]model.
&row.IssuedAt,
&row.ExpiresAt,
&row.Forecaster,
&row.Headline,
&row.Summary,
&row.Discussion,
&row.SourceURL,
&row.ImageURL,
&row.ContainsLocation,

View File

@@ -32,9 +32,6 @@ type outlookRow struct {
IssuedAt time.Time
ExpiresAt time.Time
Forecaster sql.NullString
Headline sql.NullString
Summary sql.NullString
Discussion sql.NullString
SourceURL sql.NullString
ImageURL sql.NullString
ContainsLocation bool