Chore: Fix linting issues caught by ruleguard (#28799)

* Chore: Fix linting issues caught by ruleguard

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Improve error check

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-17 11:27:45 +01:00
committed by GitHub
parent 967e9b39e8
commit 2bf964c61e
6 changed files with 39 additions and 33 deletions

View File

@ -120,7 +120,7 @@ func (m *postgresMacroEngine) evaluateMacro(name string, args []string) (string,
case "__timeGroupAlias":
tg, err := m.evaluateMacro("__timeGroup", args)
if err == nil {
return tg + " AS \"time\"", err
return tg + " AS \"time\"", nil
}
return "", err
case "__unixEpochFilter":
@ -155,7 +155,7 @@ func (m *postgresMacroEngine) evaluateMacro(name string, args []string) (string,
case "__unixEpochGroupAlias":
tg, err := m.evaluateMacro("__unixEpochGroup", args)
if err == nil {
return tg + " AS \"time\"", err
return tg + " AS \"time\"", nil
}
return "", err
default: