Rename structs and methods for better general understanding of the code flow, maintenance and organization.
Examples:
-> TelemetryDataItemRow (pkg/lib/items.go) refers to telemetry data being handled by pkg/lib/datastore.go
-> TelemetryDataItem (pkg/lib/items.go) refers to telemetry data being prepared for REST API
Both are being implemented within the same pkg, though they serve different purposes.
Note that later on, TelemetryProcessor also implements the method ToItem, to convert type TelemetryDataItemRow into TelemetryDataItem. At first glance, it isn't clear why this is needed.
This can be confusing at times, and bug prone in the future.
Rename structs and methods for better general understanding of the code flow, maintenance and organization.
Examples: ->
TelemetryDataItemRow
(pkg/lib/items.go
) refers to telemetry data being handled bypkg/lib/datastore.go
->TelemetryDataItem
(pkg/lib/items.go
) refers to telemetry data being prepared for REST APIBoth are being implemented within the same pkg, though they serve different purposes. Note that later on,
TelemetryProcessor
also implements the methodToItem
, to convert typeTelemetryDataItemRow
intoTelemetryDataItem
. At first glance, it isn't clear why this is needed. This can be confusing at times, and bug prone in the future.