Codegen: Generate Golang code using cog (#98812)
* Use cog for Go types * Delete old generation code * Fix plugins generation * workspaces update * Update datasources with new generated code * More fixes * Update swagger and openapi specs * Fixes * More files... * Update workspace * More fixes... * Remove unused functions
This commit is contained in:
@@ -154,7 +154,7 @@ func parseQuery(queryContext *backend.QueryDataRequest, logqlScopesEnabled bool)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
expr := interpolateVariables(depointerizer(model.Expr), interval, timeRange, queryType, step)
|
||||
expr := interpolateVariables(model.Expr, interval, timeRange, queryType, step)
|
||||
|
||||
direction, err := parseDirection(model.Direction)
|
||||
if err != nil {
|
||||
@@ -197,12 +197,3 @@ func parseQuery(queryContext *backend.QueryDataRequest, logqlScopesEnabled bool)
|
||||
|
||||
return qs, nil
|
||||
}
|
||||
|
||||
func depointerizer[T any](v *T) T {
|
||||
var emptyValue T
|
||||
if v != nil {
|
||||
emptyValue = *v
|
||||
}
|
||||
|
||||
return emptyValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user