Skip to content

Commit

Permalink
fix linters
Browse files Browse the repository at this point in the history
  • Loading branch information
ValyaB committed Sep 18, 2024
1 parent 23d851f commit b5a090e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ linters-settings:
sections:
- standard
- default
- prefix(cloud-proxy)
issues:
fix: true
run:
skip-dirs:
exclude-dirs:
- mock
- internal/castai
14 changes: 6 additions & 8 deletions cmd/proxy/main.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
package main

import (
"context"
"fmt"
"net/http"
"path"
"runtime"
"time"

"cloud-proxy/internal/cloud/gcp"
"cloud-proxy/internal/cloud/gcp/gcpauth"
"cloud-proxy/internal/config"
"cloud-proxy/internal/proxy"

"context"
"fmt"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"net/http"
"path"
"runtime"
"time"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Config struct {
PodMetadata PodMetadata `mapstructure:"podmetadata"`

// MetricsAddress string `mapstructure:"metricsaddress"`
// HealthAddress string `mapstructure:"healthaddress"`
// HealthAddress string `mapstructure:"healthaddress"`.
Log Log `mapstructure:"log"`
}

Expand Down
3 changes: 1 addition & 2 deletions internal/e2etest/roundtripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import (
"log"
"net/http"

"github.com/google/uuid"

cloudproxyv1alpha "cloud-proxy/proto/gen/proto/v1alpha"
"github.com/google/uuid"
)

type HTTPOverGrpcRoundTripper struct {
Expand Down
3 changes: 1 addition & 2 deletions internal/proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ import (
"sync/atomic"
"time"

cloudproxyv1alpha "cloud-proxy/proto/gen/proto/v1alpha"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"

cloudproxyv1alpha "cloud-proxy/proto/gen/proto/v1alpha"
)

const (
Expand Down
9 changes: 4 additions & 5 deletions internal/proxy/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import (
"testing"
"time"

mock_proxy "cloud-proxy/internal/proxy/mock"
cloudproxyv1alpha "cloud-proxy/proto/gen/proto/v1alpha"
"github.com/golang/mock/gomock"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"

mock_proxy "cloud-proxy/internal/proxy/mock"
cloudproxyv1alpha "cloud-proxy/proto/gen/proto/v1alpha"
)

type mockReadCloserErr struct{}
Expand All @@ -33,7 +32,7 @@ func TestClient_toResponse(t *testing.T) {
t.Parallel()
type fields struct {
// tuneMockCredentials func(m *mock_gcp.MockCredentials)
// httpClient *http.Client
// httpClient *http.Client.
}
type args struct {
msgID string
Expand Down Expand Up @@ -86,7 +85,7 @@ func TestClient_toResponse(t *testing.T) {
c := New(nil, nil, nil, "podName", "clusterID", "version", time.Second, time.Minute)
got := c.toResponse(tt.args.resp)
// diff := cmp.Diff(got, tt.want, protocmp.Transform())
// require.Empty(t, diff)
// require.Empty(t, diff).
require.Equal(t, tt.want, got)
})
}
Expand Down

0 comments on commit b5a090e

Please sign in to comment.