From b231e41b8f7b75a3c69e1164f21329c0a4fef3b8 Mon Sep 17 00:00:00 2001 From: chrismark Date: Mon, 28 Jun 2021 12:42:07 +0300 Subject: [PATCH 1/2] Fix master's linting issue Signed-off-by: chrismark --- x-pack/osquerybeat/beater/config_plugin_test.go | 3 ++- x-pack/osquerybeat/beater/logger_plugin.go | 3 ++- x-pack/osquerybeat/beater/logger_plugin_test.go | 3 ++- x-pack/osquerybeat/internal/osqd/osqueryd.go | 3 ++- x-pack/osquerybeat/internal/osqd/osqueryd_windows.go | 3 ++- x-pack/osquerybeat/internal/osqdcli/client.go | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/x-pack/osquerybeat/beater/config_plugin_test.go b/x-pack/osquerybeat/beater/config_plugin_test.go index 456836a0a59..da8dd214272 100644 --- a/x-pack/osquerybeat/beater/config_plugin_test.go +++ b/x-pack/osquerybeat/beater/config_plugin_test.go @@ -11,9 +11,10 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/google/go-cmp/cmp" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" ) diff --git a/x-pack/osquerybeat/beater/logger_plugin.go b/x-pack/osquerybeat/beater/logger_plugin.go index 83c510207f5..3160c4d64f3 100644 --- a/x-pack/osquerybeat/beater/logger_plugin.go +++ b/x-pack/osquerybeat/beater/logger_plugin.go @@ -8,8 +8,9 @@ import ( "context" "encoding/json" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/kolide/osquery-go/plugin/logger" + + "github.com/elastic/beats/v7/libbeat/logp" ) type SnapshotResult struct { diff --git a/x-pack/osquerybeat/beater/logger_plugin_test.go b/x-pack/osquerybeat/beater/logger_plugin_test.go index a501d8aebab..67cdafc25a0 100644 --- a/x-pack/osquerybeat/beater/logger_plugin_test.go +++ b/x-pack/osquerybeat/beater/logger_plugin_test.go @@ -9,10 +9,11 @@ import ( "encoding/json" "testing" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/google/go-cmp/cmp" "github.com/kolide/osquery-go/plugin/logger" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" ) diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd.go b/x-pack/osquerybeat/internal/osqd/osqueryd.go index e3de3e00913..f2e5f184bda 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd.go @@ -18,8 +18,9 @@ import ( "time" "github.com/dolmen-go/contextio" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/pkg/errors" + + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go index 22b4f2e820f..758dce74500 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go @@ -13,8 +13,9 @@ import ( "github.com/gofrs/uuid" ) + const ( - extensionName = "osquery-extension.exe" + extensionName = "osquery-extension.exe" ) func CreateSocketPath() (string, func(), error) { diff --git a/x-pack/osquerybeat/internal/osqdcli/client.go b/x-pack/osquerybeat/internal/osqdcli/client.go index ae582226573..ceb0fee340f 100644 --- a/x-pack/osquerybeat/internal/osqdcli/client.go +++ b/x-pack/osquerybeat/internal/osqdcli/client.go @@ -14,8 +14,9 @@ import ( "golang.org/x/sync/semaphore" - "github.com/elastic/beats/v7/libbeat/logp" "github.com/kolide/osquery-go" + + "github.com/elastic/beats/v7/libbeat/logp" ) const ( From 6dd5a117373d82b0d36ba4604cd257512d0298f6 Mon Sep 17 00:00:00 2001 From: chrismark Date: Mon, 28 Jun 2021 13:25:03 +0300 Subject: [PATCH 2/2] Remove empty lines Signed-off-by: chrismark --- x-pack/osquerybeat/beater/config_plugin_test.go | 1 - x-pack/osquerybeat/beater/logger_plugin_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/x-pack/osquerybeat/beater/config_plugin_test.go b/x-pack/osquerybeat/beater/config_plugin_test.go index da8dd214272..c8c52371a38 100644 --- a/x-pack/osquerybeat/beater/config_plugin_test.go +++ b/x-pack/osquerybeat/beater/config_plugin_test.go @@ -14,7 +14,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" ) diff --git a/x-pack/osquerybeat/beater/logger_plugin_test.go b/x-pack/osquerybeat/beater/logger_plugin_test.go index 67cdafc25a0..d5dd625df67 100644 --- a/x-pack/osquerybeat/beater/logger_plugin_test.go +++ b/x-pack/osquerybeat/beater/logger_plugin_test.go @@ -13,7 +13,6 @@ import ( "github.com/kolide/osquery-go/plugin/logger" "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/x-pack/osquerybeat/internal/testutil" )