Refactor convertLineCode
This commit is contained in:
parent
3e39c5e5c0
commit
e648d083f8
@ -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 {
|
func searchLine(t, code string) string {
|
||||||
if t == "rer" {
|
if t == "rer" {
|
||||||
for _, line := range IDFMLines {
|
for _, line := range IDFMLines {
|
||||||
|
@ -82,10 +82,6 @@ type PGSchedule struct {
|
|||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertLineCode(code string) string {
|
|
||||||
return strings.TrimSuffix(code, ":")
|
|
||||||
}
|
|
||||||
|
|
||||||
func getRealTime(code string, stations []string) ([]IDFMMonitoredStopVisit, error) {
|
func getRealTime(code string, stations []string) ([]IDFMMonitoredStopVisit, error) {
|
||||||
rurl, err := url.JoinPath(IDFM_BASEURL, "stop-monitoring")
|
rurl, err := url.JoinPath(IDFM_BASEURL, "stop-monitoring")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user