Updated Live

This commit is contained in:
2026-03-27 02:54:09 -04:00
parent dc0793bf59
commit 16ea2e8683
18 changed files with 2749 additions and 170 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"fmt"
"log"
"os"
"time"
@@ -11,6 +12,12 @@ import (
)
func main() {
// Redirect all log output to a file so it never pollutes the TUI.
if f, err := os.OpenFile("box-box.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o644); err == nil {
log.SetOutput(f)
defer f.Close()
}
var client *api.OpenF1Client
if apiKey := os.Getenv("OPENF1_API_KEY"); apiKey != "" {
client = api.NewOpenF1ClientWithKey("https://api.openf1.org", 15*time.Second, apiKey)