mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 09:05:04 -05:00
Chore: Enable gocyclo linter (#26395)
* Chore: Enable gocyclo linter Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Fix linting issue Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Refactor to reduce complexity Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix type assertion Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -17,6 +17,7 @@ type queryReducer struct {
|
||||
Type string
|
||||
}
|
||||
|
||||
//nolint: gocyclo
|
||||
func (s *queryReducer) Reduce(series *tsdb.TimeSeries) null.Float {
|
||||
if len(series.Points) == 0 {
|
||||
return null.FloatFromPtr(nil)
|
||||
|
||||
Reference in New Issue
Block a user