Skip to content

Commit

Permalink
refactor: move transit_realtime package
Browse files Browse the repository at this point in the history
  • Loading branch information
chuhlomin committed Sep 28, 2024
1 parent b7279e0 commit 5009fb9
Show file tree
Hide file tree
Showing 78 changed files with 6,452 additions and 746 deletions.
10 changes: 9 additions & 1 deletion examples/lirr/lirr_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import (
"flag"
"log"
"net/http"
"strings"
"time"
"unicode"

"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
Expand Down Expand Up @@ -49,7 +51,13 @@ func run() error {
// optional MtaStopTimeUpdate
var track string
track = proto.GetExtension(stopTimeUpdate, lirr.E_MtaStopTimeUpdate_Track).(string)
log.Println(track)

// trim UTF-8 wrapping characters
track = strings.TrimFunc(track, func(r rune) bool {
return unicode.Is(unicode.Cc, r)
})

log.Printf("%q", track)
}

b, err := json.MarshalIndent(entity, "", " ")
Expand Down
2 changes: 1 addition & 1 deletion feeds.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"

gtfs "github.com/errornil/mta/v3/proto/transit_realtime"
gtfs "github.com/errornil/transit_realtime"
)

type Feed string
Expand Down
2 changes: 1 addition & 1 deletion feeds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/proto"

"github.com/errornil/mta/v3/proto/transit_realtime"
"github.com/errornil/transit_realtime"
)

func str(v string) *string {
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module github.com/errornil/mta/v3

go 1.18
go 1.23.1

require (
github.com/errornil/transit_realtime v0.0.0-20240928052954-11bab7223f49
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
google.golang.org/protobuf v1.28.1
google.golang.org/protobuf v1.34.2
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/errornil/transit_realtime v0.0.0-20240928052954-11bab7223f49 h1:cuvbSgq1crqVEgFaYv8eiY2APqFK4mjIziqF/e3Vig4=
github.com/errornil/transit_realtime v0.0.0-20240928052954-11bab7223f49/go.mod h1:yrV7jFeYM32Cpzr4V8TsfZlmAohqiFKnV9QgBjKTXc4=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -13,9 +14,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
Loading

0 comments on commit 5009fb9

Please sign in to comment.