From 87527465e59dafbebed257610b8b43f29b11a3f1 Mon Sep 17 00:00:00 2001 From: Jason Playne Date: Sun, 12 Nov 2023 16:25:48 +0800 Subject: [PATCH] yet more linting fixes --- cmd/pw_router/worker.go | 2 +- lib/export/location.go | 2 +- lib/sink/sink.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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() {