Chore/fix lint issues (#27704)
* Chore: Fix linting issues Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ type kqlMacroEngine struct {
|
||||
// - $__contains(col, 'val1','val2') -> col in ('val1', 'val2')
|
||||
// - $__escapeMulti('\\vm\eth0\Total','\\vm\eth2\Total') -> @'\\vm\eth0\Total',@'\\vm\eth2\Total'
|
||||
|
||||
//KqlInterpolate interpolates macros for Kusto Query Language (KQL) queries
|
||||
// KqlInterpolate interpolates macros for Kusto Query Language (KQL) queries
|
||||
func KqlInterpolate(query *tsdb.Query, timeRange *tsdb.TimeRange, kql string, defaultTimeField ...string) (string, error) {
|
||||
engine := kqlMacroEngine{}
|
||||
|
||||
@@ -46,7 +46,7 @@ func (m *kqlMacroEngine) Interpolate(query *tsdb.Query, timeRange *tsdb.TimeRang
|
||||
|
||||
var macroError error
|
||||
|
||||
//First pass for the escapeMulti macro
|
||||
// First pass for the escapeMulti macro
|
||||
kql = m.ReplaceAllStringSubmatchFunc(escapeMultiRegex, kql, func(groups []string) string {
|
||||
args := []string{}
|
||||
|
||||
@@ -58,7 +58,7 @@ func (m *kqlMacroEngine) Interpolate(query *tsdb.Query, timeRange *tsdb.TimeRang
|
||||
return fmt.Sprintf("@%s", expr)
|
||||
})
|
||||
|
||||
//second pass for all the other macros
|
||||
// second pass for all the other macros
|
||||
kql = m.ReplaceAllStringSubmatchFunc(rExp, kql, func(groups []string) string {
|
||||
args := []string{}
|
||||
if len(groups) > 2 {
|
||||
|
||||
@@ -54,7 +54,7 @@ type AzureMonitorResponse struct {
|
||||
Resourceregion string `json:"resourceregion"`
|
||||
}
|
||||
|
||||
//ApplicationInsightsQueryResponse is the json response from the Application Insights API
|
||||
// ApplicationInsightsQueryResponse is the json response from the Application Insights API
|
||||
type ApplicationInsightsQueryResponse struct {
|
||||
Tables []struct {
|
||||
Name string `json:"name"`
|
||||
@@ -71,7 +71,7 @@ type AzureLogAnalyticsResponse struct {
|
||||
Tables []AzureLogAnalyticsTable `json:"tables"`
|
||||
}
|
||||
|
||||
//AzureLogAnalyticsTable is the table format for Log Analytics responses
|
||||
// AzureLogAnalyticsTable is the table format for Log Analytics responses
|
||||
type AzureLogAnalyticsTable struct {
|
||||
Name string `json:"name"`
|
||||
Columns []struct {
|
||||
|
||||
Reference in New Issue
Block a user