Refactor convertLineCode
This commit is contained in:
parent
3e39c5e5c0
commit
e648d083f8
2 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue