Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866)
* Chore: Fix issues reported by staticcheck Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Apply suggestions from code review Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Emil Tullstedt
parent
135b83e17f
commit
676d393ec9
+1
-1
@@ -13,7 +13,7 @@ func HandleRequest(ctx context.Context, dsInfo *models.DataSource, req *TsdbQuer
|
||||
var endpoint TsdbQueryEndpoint
|
||||
fn, exists := registry[dsInfo.Type]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("Could not find executor for data source type: %s", dsInfo.Type)
|
||||
return nil, fmt.Errorf("could not find executor for data source type: %s", dsInfo.Type)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
@@ -199,7 +199,7 @@ func (e *sqlQueryEndpoint) Query(ctx context.Context, dsInfo *models.DataSource,
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// global macros/substitutions for all sql datasources
|
||||
// Interpolate provides global macros/substitutions for all sql datasources.
|
||||
var Interpolate = func(query *tsdb.Query, timeRange *tsdb.TimeRange, sql string) (string, error) {
|
||||
minInterval, err := tsdb.GetIntervalFrom(query.DataSource, query.Model, time.Second*60)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user