Sfoglia il codice sorgente

chatto-send: link embedded in store column

Paul Klumpp 3 giorni fa
parent
commit
2dfc69a7ce
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      cmd/cheapo/chatto.go

+ 4 - 4
cmd/cheapo/chatto.go

@@ -52,8 +52,8 @@ func formatGames(games []game.Game, upcoming bool) string {
 	}
 
 	// One table per store keeps columns uniform (dates only for epic).
-	b.WriteString("| Game | Store | Period | Link |\n")
-	b.WriteString("|---|---|---|---|\n")
+	b.WriteString("| Game | Store | Period |\n")
+	b.WriteString("|---|---|---|\n")
 	for _, g := range games {
 		period := "—"
 		if g.Kind == "upcoming" && !g.StartDate.IsZero() && !g.EndDate.IsZero() {
@@ -63,8 +63,8 @@ func formatGames(games []game.Game, upcoming bool) string {
 		} else if !g.EndDate.IsZero() {
 			period = "until " + g.EndDate.Local().Format("02.01.")
 		}
-		fmt.Fprintf(&b, "| **%s** | %s | %s | [Store](%s) |\n",
-			escapePipe(g.Title), g.Store, period, g.URL)
+		fmt.Fprintf(&b, "| **%s** | [%s](%s) | %s |\n",
+			escapePipe(g.Title), g.Store, g.URL, period)
 	}
 
 	b.WriteString("\n_As of now — free from/until 17:00 Europe/Berlin each._")