Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
orouz committed Jan 21, 2025
1 parent d4ef685 commit d9a4656
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 16 deletions.
3 changes: 2 additions & 1 deletion internal/dataprovider/providers/k8s/client_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion internal/evaluator/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/flavors/benchmark/k8s_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions internal/flavors/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/elastic/beats/v7/libbeat/beat"

"github.com/elastic/cloudbeat/internal/resources/utils/clog"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion internal/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion internal/launcher/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/resources/fetching/fetchers/aws/ecr_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions internal/resources/providers/awslib/all_region_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"context"

"github.com/aws/aws-sdk-go-v2/aws"

"github.com/elastic/cloudbeat/internal/resources/utils/clog"
)

Expand Down
1 change: 1 addition & 0 deletions internal/resources/providers/awslib/multi_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"sync"

"github.com/aws/aws-sdk-go-v2/aws"

"github.com/elastic/cloudbeat/internal/resources/utils/clog"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion internal/resources/utils/testhelper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions internal/uniqueness/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion internal/vulnerability/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d9a4656

Please sign in to comment.