Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nddq committed Mar 14, 2024
1 parent 1ca06f2 commit d89ec22
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/module/metrics/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"strings"

"github.com/cilium/cilium/api/v1/flow"
v1 "github.com/cilium/cilium/api/v1/flow"
api "github.com/microsoft/retina/crd/api/v1alpha1"
"github.com/microsoft/retina/pkg/exporter"
Expand Down Expand Up @@ -83,7 +82,7 @@ func (d *DNSMetrics) getLabels() []string {
return labels
}

func (d *DNSMetrics) values(flow *flow.Flow) []string {
func (d *DNSMetrics) values(flow *v1.Flow) []string {
flowDns, dnsType, numResponses := utils.GetDns(flow)
if flowDns == nil {
return nil
Expand Down
3 changes: 1 addition & 2 deletions pkg/module/metrics/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"github.com/golang/mock/gomock"
"github.com/microsoft/retina/pkg/log"
"github.com/microsoft/retina/pkg/metrics"
"github.com/microsoft/retina/pkg/utils"
"github.com/prometheus/client_golang/prometheus"
"gotest.tools/v3/assert"

"github.com/microsoft/retina/pkg/utils"
)

func TestGetLabels(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/plugin/dropreason/dropreason_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/cilium/ebpf/perf"
"github.com/golang/mock/gomock"
kcfg "github.com/microsoft/retina/pkg/config"

Check failure on line 20 in pkg/plugin/dropreason/dropreason_linux_test.go

View workflow job for this annotation

GitHub Actions / Lint (1.21.x, ubuntu-latest)

`kcfg` redeclared in this block (typecheck)
"github.com/microsoft/retina/pkg/enricher"
"github.com/microsoft/retina/pkg/log"
"github.com/microsoft/retina/pkg/metrics"
Expand Down
1 change: 1 addition & 0 deletions pkg/plugin/linuxutil/types_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
kcfg "github.com/microsoft/retina/pkg/config"

"github.com/cakturk/go-netstat/netstat"
kcfg "github.com/microsoft/retina/pkg/config"
"github.com/microsoft/retina/pkg/log"
"github.com/microsoft/retina/pkg/plugin/api"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/plugin/mockplugin/mockplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
kcfg "github.com/microsoft/retina/pkg/config"

hubblev1 "github.com/cilium/cilium/pkg/hubble/api/v1"
kcfg "github.com/microsoft/retina/pkg/config"
"github.com/microsoft/retina/pkg/log"
"github.com/microsoft/retina/pkg/plugin/api"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/plugin/packetparser/packetparser_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/microsoft/retina/pkg/metrics"
"github.com/microsoft/retina/pkg/plugin/packetparser/mocks"
"github.com/microsoft/retina/pkg/watchers/endpoint"
"github.com/prometheus/client_golang/prometheus"

Check failure on line 31 in pkg/plugin/packetparser/packetparser_linux_test.go

View workflow job for this annotation

GitHub Actions / Lint (1.21.x, ubuntu-latest)

`prometheus` redeclared in this block (typecheck)
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vishvananda/netlink"
Expand Down

0 comments on commit d89ec22

Please sign in to comment.