Skip to content

Commit

Permalink
trimmed search results
Browse files Browse the repository at this point in the history
- removed ID and prefix from results
  • Loading branch information
Kaya-Sem committed Sep 29, 2024
1 parent 6283132 commit be35a21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand All @@ -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)
}
}

Expand Down

0 comments on commit be35a21

Please sign in to comment.