Documentation
¶
Overview ¶
Package data bundles the race highlights TSV and the static circuit dataset into the binary via go:embed. No filesystem path search is performed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HighlightsMap ¶
HighlightsMap returns a year→round→URL map built from the bundled TSV.
func PreRaceContextMap ¶
PreRaceContextMap returns a (year,round)→context_text map for pre-race blurbs.
Types ¶
type HighlightEntry ¶
HighlightEntry is one row from the highlights TSV.
func LoadHighlights ¶
func LoadHighlights() ([]HighlightEntry, error)
LoadHighlights parses the bundled TSV and returns all valid entries. Rows with missing URL, missing round, or non-ok status are skipped.
type TrackInfo ¶
type TrackInfo struct {
CircuitID string
FullName string
Locality string
Country string
LengthKm float64
Laps int // typical race distance
Turns int
DRSZones int
LapRecordTime string // "M:SS.mmm"
LapRecordDriver string
LapRecordYear int
Character string // 1-2 sentence track vibe
}
TrackInfo holds static metadata for one F1 circuit. LapRecord is the all-time fastest race lap ever set at this venue.
func GetTrackInfo ¶
GetTrackInfo looks up a circuit by its Ergast circuit_id. Returns nil for unknown circuits.