From be35a217b20754b427dfe5184825a7c9a92d9707 Mon Sep 17 00:00:00 2001 From: Kaya-Sem Date: Sun, 29 Sep 2024 17:37:20 +0200 Subject: [PATCH] trimmed search results - removed ID and prefix from results --- main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index cffcc2d..7bce2a3 100644 --- a/main.go +++ b/main.go @@ -2,11 +2,12 @@ package main import ( "fmt" + "os" + "time" + "github.com/Kaya-Sem/commandtrein/cmd" "github.com/Kaya-Sem/commandtrein/cmd/api" table "github.com/Kaya-Sem/commandtrein/cmd/tables" - "os" - "time" teaTable "github.com/charmbracelet/bubbles/table" ) @@ -55,7 +56,7 @@ func handleConnection(stationFrom string, stationTo string) { departureTimeWithDelay := cmd.UnixToHHMM(conn.Departure.Time) delay := cmd.FormatDelay(conn.Departure.Delay) if delay != "" { - departureTimeWithDelay += delay // Append delay to the time + departureTimeWithDelay += " " + delay // Append delay to the time } // Populate the row @@ -80,7 +81,7 @@ func handleSearch() { } for _, station := range stations { - fmt.Printf("%s %s\n", station.ID, station.Name) + fmt.Printf("%s\n", station.Name) } }