Skip to content

Commit

Permalink
[chore] fix exhaustive lint for filereceiver (#23775)
Browse files Browse the repository at this point in the history
**Description:** <Describe what has changed.>
Related issue
#23266

Signed-off-by: Ziqi Zhao <[email protected]>
  • Loading branch information
fatsheep9146 committed Jul 5, 2023
1 parent 93bb857 commit 3d8b093
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ issues:
# in order to enable the exhaustive lint check.
# We should not add more exclude-rules.
# The progress of solving existing exclude-rules will be tracked in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23266
- path: filereceiver
linters:
- exhaustive
- path: fluentforwardreceiver
linters:
- exhaustive
Expand Down
2 changes: 2 additions & 0 deletions receiver/filereceiver/file_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ func getFirstTimestampFromMetric(metric pmetric.Metric) pcommon.Timestamp {
return 0
}
return dps.At(0).Timestamp()
case pmetric.MetricTypeEmpty:
return 0
}
return 0
}

0 comments on commit 3d8b093

Please sign in to comment.