You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: