diff --git a/cmd/pw_router/worker.go b/cmd/pw_router/worker.go index f76521bc..dfe4e385 100644 --- a/cmd/pw_router/worker.go +++ b/cmd/pw_router/worker.go @@ -232,7 +232,7 @@ func (w *worker) handleMsg(msg []byte) error { } w.router.syncSamples.Store(merged.Icao, merged) - mergedMsg, err := merged.ToJsonBytes() + mergedMsg, err := merged.ToJSONBytes() if nil != err { return err } diff --git a/lib/export/location.go b/lib/export/location.go index 5e5bb753..b0e92e30 100644 --- a/lib/export/location.go +++ b/lib/export/location.go @@ -59,7 +59,7 @@ func NewPlaneLocation(plane *tracker.Plane, isNew, isRemoved bool, source string } } -func (pl *PlaneLocation) ToJsonBytes() ([]byte, error) { +func (pl *PlaneLocation) ToJSONBytes() ([]byte, error) { json := jsoniter.ConfigFastest pl.sourceTagsMutex.Lock() diff --git a/lib/sink/sink.go b/lib/sink/sink.go index 6cce1528..cc5e2cde 100644 --- a/lib/sink/sink.go +++ b/lib/sink/sink.go @@ -72,7 +72,7 @@ func (s *Sink) trackerMsgJson(le *tracker.PlaneLocationEvent) ([]byte, error) { } eventStruct := export.NewPlaneLocation(plane, le.New(), le.Removed(), s.config.sourceTag) - return eventStruct.ToJsonBytes() + return eventStruct.ToJSONBytes() } func (s *Sink) doSend() {