mirror of
https://github.com/grafana/grafana.git
synced 2026-08-10 05:08:16 -05:00
Chore: Fix issues found by staticcheck (#28802)
* Fix linting issues Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -343,7 +343,7 @@ func (e *sqlQueryEndpoint) transformToTimeSeries(query *tsdb.Query, rows *core.R
|
||||
}
|
||||
|
||||
if cfg.timeIndex == -1 {
|
||||
return fmt.Errorf("Found no column named %s", strings.Join(e.timeColumnNames, " or "))
|
||||
return fmt.Errorf("found no column named %q", strings.Join(e.timeColumnNames, " or "))
|
||||
}
|
||||
|
||||
if cfg.fillMissing {
|
||||
@@ -666,7 +666,10 @@ func ConvertSqlValueColumnToFloat(columnName string, columnValue interface{}) (n
|
||||
case nil:
|
||||
value.Valid = false
|
||||
default:
|
||||
return null.NewFloat(0, false), fmt.Errorf("Value column must have numeric datatype, column: %s type: %T value: %v", columnName, typedValue, typedValue)
|
||||
return null.NewFloat(0, false), fmt.Errorf(
|
||||
"value column must have numeric datatype, column: %s, type: %T, value: %v",
|
||||
columnName, typedValue, typedValue,
|
||||
)
|
||||
}
|
||||
|
||||
return value, nil
|
||||
|
||||
Reference in New Issue
Block a user