Skip to content

Commit

Permalink
Fix make verify
Browse files Browse the repository at this point in the history
  • Loading branch information
vlvasilev committed Apr 1, 2023
1 parent 3f077fb commit e50ffb8
Show file tree
Hide file tree
Showing 44 changed files with 136 additions and 140 deletions.
1 change: 1 addition & 0 deletions .golangci.yaml
Expand Up @@ -35,6 +35,7 @@ issues:
- "invalid operation: cannot compare .*"
- "client.StopWait undefined .*"
- "could not import github.com/gardener/gardener/pkg/apis/core/v1beta1/constants .*"
- "Error return value of `informer.AddEventHandler` is not checked"
exclude-rules:
- linters:
- staticcheck
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -98,6 +98,8 @@ test:
.PHONY: install-requirements
install-requirements:
@go install -mod=vendor github.com/onsi/ginkgo/ginkgo
@go install -v github.com/incu6us/goimports-reviser/v3@latest
@GO111MODULE=off go get golang.org/x/tools/cmd/goimports
@$(REPO_ROOT)/hack/install-requirements.sh

.PHONY: verify
Expand Down
5 changes: 2 additions & 3 deletions cmd/event-logger/app/options.go
Expand Up @@ -19,9 +19,6 @@ import (
"flag"

"github.com/gardener/gardener/pkg/logger"

"github.com/gardener/logging/pkg/events"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -33,6 +30,8 @@ import (
"k8s.io/component-base/version"
"k8s.io/component-base/version/verflag"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"

"github.com/gardener/logging/pkg/events"
)

// NewCommandStartGardenerEventLogger creates a *cobra.Command object with default parameters.
Expand Down
17 changes: 8 additions & 9 deletions cmd/fluent-bit-loki-plugin/out_loki.go
Expand Up @@ -8,7 +8,6 @@ Modifications Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights
package main

import (
"C"
"fmt"
"net/http"
_ "net/http/pprof"
Expand All @@ -18,14 +17,7 @@ import (
"time"
"unsafe"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/healthz"
"github.com/gardener/logging/pkg/lokiplugin"
"github.com/gardener/logging/pkg/metrics"

gardenerclientsetversioned "github.com/gardener/logging/pkg/cluster/clientset/versioned"
gardeninternalcoreinformers "github.com/gardener/logging/pkg/cluster/informers/externalversions"

"C"
"github.com/fluent/fluent-bit-go/output"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
Expand All @@ -34,6 +26,13 @@ import (
"github.com/weaveworks/common/logging"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"

gardenerclientsetversioned "github.com/gardener/logging/pkg/cluster/clientset/versioned"
gardeninternalcoreinformers "github.com/gardener/logging/pkg/cluster/informers/externalversions"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/healthz"
"github.com/gardener/logging/pkg/lokiplugin"
"github.com/gardener/logging/pkg/metrics"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki-curator/app/loki_curator.go
Expand Up @@ -18,11 +18,11 @@ import (
"flag"
"os"

config "github.com/gardener/logging/pkg/loki/curator/config"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/weaveworks/common/logging"

config "github.com/gardener/logging/pkg/loki/curator/config"
)

var (
Expand Down
7 changes: 3 additions & 4 deletions cmd/loki-curator/main.go
Expand Up @@ -16,17 +16,16 @@ package main

import (
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime"

"github.com/gardener/logging/cmd/loki-curator/app"
"github.com/gardener/logging/pkg/loki/curator"
"github.com/go-kit/kit/log/level"

"github.com/prometheus/client_golang/prometheus/promhttp"

_ "net/http/pprof"
"github.com/gardener/logging/cmd/loki-curator/app"
"github.com/gardener/logging/pkg/loki/curator"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions pkg/buffer/buffer.go
Expand Up @@ -9,10 +9,10 @@ package buffer
import (
"fmt"

"github.com/go-kit/kit/log"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
)

// NewBuffer makes a new buffered Client.
Expand Down
6 changes: 3 additions & 3 deletions pkg/buffer/buffer_test.go
Expand Up @@ -19,15 +19,15 @@ import (
"sync"
"time"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/prometheus/common/model"
"github.com/weaveworks/common/logging"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

var _ = Describe("Buffer", func() {
Expand Down
8 changes: 4 additions & 4 deletions pkg/buffer/dque.go
Expand Up @@ -13,15 +13,15 @@ import (
"sync"
"time"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/metrics"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/grafana/loki/pkg/logproto"
"github.com/joncrlsn/dque"
"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/metrics"
"github.com/gardener/logging/pkg/types"
)

type dqueEntry struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/buffer_client.go
Expand Up @@ -9,11 +9,11 @@ package client
import (
"fmt"

"github.com/go-kit/kit/log"

"github.com/gardener/logging/pkg/buffer"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
)

// NewBufferDecorator makes a new buffered Client.
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/client.go
Expand Up @@ -17,12 +17,12 @@ package client
import (
"time"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/grafana/loki/pkg/promtail/client"
"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/client_test.go
Expand Up @@ -19,8 +19,6 @@ import (
"os"
"time"

"github.com/gardener/logging/pkg/config"

"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/flagext"
"github.com/go-kit/kit/log"
Expand All @@ -31,6 +29,8 @@ import (
. "github.com/onsi/gomega"
"github.com/prometheus/common/model"
"github.com/weaveworks/common/logging"

"github.com/gardener/logging/pkg/config"
)

var _ = Describe("Client", func() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/metric_promtail_client.go
Expand Up @@ -17,15 +17,15 @@ package client
import (
"time"

"github.com/gardener/logging/pkg/metrics"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/pkg/promtail/api"
"github.com/grafana/loki/pkg/promtail/client"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/metrics"
"github.com/gardener/logging/pkg/types"
)

type promtailClientWithForwardedLogsMetricCounter struct {
Expand Down
9 changes: 4 additions & 5 deletions pkg/client/multi_tenant_client.go
Expand Up @@ -18,15 +18,14 @@ import (
"strings"
"time"

"github.com/gardener/logging/pkg/batch"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
"github.com/go-kit/kit/log"

"github.com/grafana/loki/pkg/promtail/client"
giterrors "github.com/pkg/errors"
"github.com/prometheus/common/model"

giterrors "github.com/pkg/errors"
"github.com/gardener/logging/pkg/batch"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

type multiTenantClient struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/multi_tenant_client_test.go
Expand Up @@ -18,18 +18,18 @@ import (
"os"
"time"

"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
"github.com/weaveworks/common/logging"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
promtailclient "github.com/grafana/loki/pkg/promtail/client"
. "github.com/onsi/ginkgo"
ginkotable "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"github.com/prometheus/common/model"
"github.com/weaveworks/common/logging"

"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

var _ = Describe("Multi Tenant Client", func() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/pack_client.go
Expand Up @@ -19,11 +19,11 @@ import (
"strings"
"time"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
"github.com/go-kit/kit/log"

"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

type packClient struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/pack_client_test.go
Expand Up @@ -19,18 +19,18 @@ import (
"os"
"time"

"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/weaveworks/common/logging"

"github.com/grafana/loki/pkg/logproto"
. "github.com/onsi/ginkgo"
ginkotable "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"github.com/prometheus/common/model"
"github.com/weaveworks/common/logging"

"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

var _ = Describe("Pack Client", func() {
Expand Down
8 changes: 4 additions & 4 deletions pkg/client/sorted_client.go
Expand Up @@ -18,14 +18,14 @@ import (
"sync"
"time"

"github.com/gardener/logging/pkg/batch"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/batch"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

type sortedClient struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/client/sorted_client_test.go
Expand Up @@ -19,18 +19,18 @@ import (
"time"

"github.com/cortexproject/cortex/pkg/util/flagext"
"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
"github.com/weaveworks/common/logging"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/grafana/loki/pkg/logproto"
promtailclient "github.com/grafana/loki/pkg/promtail/client"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/prometheus/common/model"
"github.com/weaveworks/common/logging"

"github.com/gardener/logging/pkg/client"
"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

var _ = Describe("Sorted Client", func() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/types.go
Expand Up @@ -17,12 +17,12 @@ package client
import (
"time"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"

"github.com/go-kit/kit/log"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/common/model"

"github.com/gardener/logging/pkg/config"
"github.com/gardener/logging/pkg/types"
)

// LokiClient represents an instance which sends logs to Loki ingester
Expand Down

0 comments on commit e50ffb8

Please sign in to comment.