Refactor convertLineCode

This commit is contained in:
nemunaire 2024-07-27 10:37:15 +02:00
parent 3e39c5e5c0
commit e648d083f8
2 changed files with 4 additions and 4 deletions

View File

@ -97,6 +97,10 @@ func convertLineType(old string) string {
}
}
func convertLineCode(code string) string {
return strings.TrimPrefix(strings.TrimSuffix(code, ":"), "STIF:Line::")
}
func searchLine(t, code string) string {
if t == "rer" {
for _, line := range IDFMLines {

View File

@ -82,10 +82,6 @@ type PGSchedule struct {
Message string `json:"message"`
}
func convertLineCode(code string) string {
return strings.TrimSuffix(code, ":")
}
func getRealTime(code string, stations []string) ([]IDFMMonitoredStopVisit, error) {
rurl, err := url.JoinPath(IDFM_BASEURL, "stop-monitoring")
if err != nil {