diff --git a/internal/dataprovider/providers/k8s/client_provider.go b/internal/dataprovider/providers/k8s/client_provider.go index c25affa8c6..4e16f5977b 100644 --- a/internal/dataprovider/providers/k8s/client_provider.go +++ b/internal/dataprovider/providers/k8s/client_provider.go @@ -20,12 +20,13 @@ package k8s import ( "os" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-autodiscover/kubernetes" "github.com/go-logr/zapr" "go.uber.org/zap" k8s "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type ClientGetterAPI interface { diff --git a/internal/evaluator/logger.go b/internal/evaluator/logger.go index a5b1d86b98..942c73bb91 100644 --- a/internal/evaluator/logger.go +++ b/internal/evaluator/logger.go @@ -18,11 +18,12 @@ package evaluator import ( - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-libs/logp" "github.com/open-policy-agent/opa/v1/logging" "go.uber.org/zap" "go.uber.org/zap/zapcore" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type logger struct { diff --git a/internal/flavors/benchmark/k8s_helper.go b/internal/flavors/benchmark/k8s_helper.go index 7111b25e76..0d2938819b 100644 --- a/internal/flavors/benchmark/k8s_helper.go +++ b/internal/flavors/benchmark/k8s_helper.go @@ -22,7 +22,7 @@ import ( "fmt" "github.com/elastic/elastic-agent-autodiscover/kubernetes" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" // revive:disable-line client_gokubernetes "k8s.io/client-go/kubernetes" "github.com/elastic/cloudbeat/internal/config" diff --git a/internal/flavors/publisher.go b/internal/flavors/publisher.go index 1b8202610b..77215a96b5 100644 --- a/internal/flavors/publisher.go +++ b/internal/flavors/publisher.go @@ -22,6 +22,7 @@ import ( "time" "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) diff --git a/internal/inventory/inventory.go b/internal/inventory/inventory.go index 4a4021280e..7f942fbe8c 100644 --- a/internal/inventory/inventory.go +++ b/internal/inventory/inventory.go @@ -25,9 +25,10 @@ import ( "github.com/elastic/beats/v7/libbeat/beat" libevents "github.com/elastic/beats/v7/libbeat/beat/events" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-libs/mapstr" "github.com/samber/lo" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) const ( diff --git a/internal/launcher/launcher.go b/internal/launcher/launcher.go index b95604d688..d15f2718db 100644 --- a/internal/launcher/launcher.go +++ b/internal/launcher/launcher.go @@ -28,9 +28,10 @@ import ( "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/management/status" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-libs/config" "github.com/elastic/go-ucfg" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) const ( diff --git a/internal/launcher/listener.go b/internal/launcher/listener.go index e96eb7dfb9..7acfb6c058 100644 --- a/internal/launcher/listener.go +++ b/internal/launcher/listener.go @@ -22,8 +22,9 @@ package launcher import ( "github.com/elastic/beats/v7/libbeat/common/reload" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-libs/config" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type Listener struct { diff --git a/internal/resources/fetching/fetchers/aws/ecr_fetcher.go b/internal/resources/fetching/fetchers/aws/ecr_fetcher.go index 1a517386e3..1e6358437b 100644 --- a/internal/resources/fetching/fetchers/aws/ecr_fetcher.go +++ b/internal/resources/fetching/fetchers/aws/ecr_fetcher.go @@ -23,7 +23,7 @@ import ( "regexp" "github.com/aws/aws-sdk-go-v2/service/ecr/types" - v1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" // revive:disable-line metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8s "k8s.io/client-go/kubernetes" diff --git a/internal/resources/providers/awslib/all_region_selector.go b/internal/resources/providers/awslib/all_region_selector.go index 8f331483ef..3a73daac35 100644 --- a/internal/resources/providers/awslib/all_region_selector.go +++ b/internal/resources/providers/awslib/all_region_selector.go @@ -22,6 +22,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) diff --git a/internal/resources/providers/awslib/cached_region_selector.go b/internal/resources/providers/awslib/cached_region_selector.go index 30a204fe39..f522dc7d9e 100644 --- a/internal/resources/providers/awslib/cached_region_selector.go +++ b/internal/resources/providers/awslib/cached_region_selector.go @@ -25,6 +25,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/dgraph-io/ristretto" + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) diff --git a/internal/resources/providers/awslib/current_region_selector.go b/internal/resources/providers/awslib/current_region_selector.go index e4fd54a24c..3225159b81 100644 --- a/internal/resources/providers/awslib/current_region_selector.go +++ b/internal/resources/providers/awslib/current_region_selector.go @@ -21,6 +21,7 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) diff --git a/internal/resources/providers/awslib/multi_region.go b/internal/resources/providers/awslib/multi_region.go index e612d7fc4a..6b178c980c 100644 --- a/internal/resources/providers/awslib/multi_region.go +++ b/internal/resources/providers/awslib/multi_region.go @@ -25,6 +25,7 @@ import ( "sync" "github.com/aws/aws-sdk-go-v2/aws" + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) diff --git a/internal/resources/providers/azurelib/inventory/mysql_provider_test.go b/internal/resources/providers/azurelib/inventory/mysql_provider_test.go index fbf9e1857e..ad8fd009ba 100644 --- a/internal/resources/providers/azurelib/inventory/mysql_provider_test.go +++ b/internal/resources/providers/azurelib/inventory/mysql_provider_test.go @@ -25,8 +25,9 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysqlflexibleservers" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/stretchr/testify/require" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type flexibleConfigFn func(configName string) (armmysqlflexibleservers.ConfigurationsClientGetResponse, error) diff --git a/internal/resources/providers/azurelib/inventory/postgresql_provider_test.go b/internal/resources/providers/azurelib/inventory/postgresql_provider_test.go index abcc367898..f19091b902 100644 --- a/internal/resources/providers/azurelib/inventory/postgresql_provider_test.go +++ b/internal/resources/providers/azurelib/inventory/postgresql_provider_test.go @@ -26,9 +26,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/samber/lo" "github.com/stretchr/testify/require" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type ( diff --git a/internal/resources/providers/azurelib/inventory/subscriptions_provider_test.go b/internal/resources/providers/azurelib/inventory/subscriptions_provider_test.go index c166c6e74c..1b338e2344 100644 --- a/internal/resources/providers/azurelib/inventory/subscriptions_provider_test.go +++ b/internal/resources/providers/azurelib/inventory/subscriptions_provider_test.go @@ -25,8 +25,9 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/stretchr/testify/require" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type ( diff --git a/internal/resources/providers/gcplib/inventory/grpc_rate_limiter.go b/internal/resources/providers/gcplib/inventory/grpc_rate_limiter.go index 18f766b03f..78d822ec6f 100644 --- a/internal/resources/providers/gcplib/inventory/grpc_rate_limiter.go +++ b/internal/resources/providers/gcplib/inventory/grpc_rate_limiter.go @@ -21,11 +21,12 @@ import ( "context" "time" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/googleapis/gax-go/v2" "golang.org/x/time/rate" "google.golang.org/grpc" "google.golang.org/grpc/codes" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) // a gax.CallOption that defines a retry strategy which retries the request on ResourceExhausted error. diff --git a/internal/resources/providers/gcplib/inventory/grpc_rate_limiter_test.go b/internal/resources/providers/gcplib/inventory/grpc_rate_limiter_test.go index 18672e55c8..3cf75a424f 100644 --- a/internal/resources/providers/gcplib/inventory/grpc_rate_limiter_test.go +++ b/internal/resources/providers/gcplib/inventory/grpc_rate_limiter_test.go @@ -22,9 +22,10 @@ import ( "testing" "time" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/stretchr/testify/suite" "golang.org/x/time/rate" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type RateLimiterTestSuite struct { diff --git a/internal/resources/utils/testhelper/helper.go b/internal/resources/utils/testhelper/helper.go index 5cc48ff006..3d35af2880 100644 --- a/internal/resources/utils/testhelper/helper.go +++ b/internal/resources/utils/testhelper/helper.go @@ -21,9 +21,10 @@ import ( "testing" "time" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-libs/logp" "github.com/stretchr/testify/require" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) // CollectResources fetches items from a channel and returns them in a slice. diff --git a/internal/uniqueness/leaderelection.go b/internal/uniqueness/leaderelection.go index 98ffdd2961..289ae24585 100644 --- a/internal/uniqueness/leaderelection.go +++ b/internal/uniqueness/leaderelection.go @@ -28,14 +28,15 @@ import ( "sync" "time" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/elastic/elastic-agent-autodiscover/kubernetes" "github.com/gofrs/uuid" - v1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" // revive:disable-line metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8s "k8s.io/client-go/kubernetes" le "k8s.io/client-go/tools/leaderelection" rl "k8s.io/client-go/tools/leaderelection/resourcelock" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type LeaderelectionManager struct { diff --git a/internal/vulnerability/runner.go b/internal/vulnerability/runner.go index 4787228eb7..1ba8e09c57 100644 --- a/internal/vulnerability/runner.go +++ b/internal/vulnerability/runner.go @@ -26,8 +26,9 @@ import ( fanal_types "github.com/aquasecurity/trivy/pkg/fanal/types" "github.com/aquasecurity/trivy/pkg/flag" trivy_types "github.com/aquasecurity/trivy/pkg/types" - "github.com/elastic/cloudbeat/internal/resources/utils/clog" "github.com/google/go-containerregistry/pkg/name" + + "github.com/elastic/cloudbeat/internal/resources/utils/clog" ) type VulnerabilityRunner struct {