Chore/fix lint issues (#27704)

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-09-22 16:22:19 +02:00
committed by GitHub
parent ffc11cb63c
commit a5d9196a53
70 changed files with 274 additions and 276 deletions
+3 -3
View File
@@ -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 {
+2 -2
View File
@@ -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 {