diff --git a/.errcheck_excludes.txt b/.errcheck_excludes.txt deleted file mode 100644 index bc630477ca6..00000000000 --- a/.errcheck_excludes.txt +++ /dev/null @@ -1,2 +0,0 @@ -(github.com/go-kit/log.Logger).Log -(hash.Hash).Write diff --git a/.golangci.yml b/.golangci.yml index 8e3080f0ebc..d672c9c1b94 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,7 +34,9 @@ linters-settings: - pkg: github.com/segmentio/parquet-go desc: Use github.com/parquet-go/parquet-go instead errcheck: - exclude: ./.errcheck_excludes.txt + exclude-functions: + - (github.com/go-kit/log.Logger).Log + - (hash.Hash).Write goimports: local-prefixes: github.com/parca-dev/parca gofumpt: diff --git a/pkg/debuginfo/store_test.go b/pkg/debuginfo/store_test.go index 7349c8d028b..5aef73e2906 100644 --- a/pkg/debuginfo/store_test.go +++ b/pkg/debuginfo/store_test.go @@ -109,7 +109,7 @@ func TestStore(t *testing.T) { } }() - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer conn.Close() diff --git a/pkg/parca/parca.go b/pkg/parca/parca.go index c2baf0387fc..c9d474525bc 100644 --- a/pkg/parca/parca.go +++ b/pkg/parca/parca.go @@ -436,7 +436,7 @@ func Run(ctx context.Context, logger log.Logger, reg *prometheus.Registry, flags otelgrpc.WithPropagators(propagators), )), } - conn, err := grpc.Dial(flags.ProfileShareServer, opts...) + conn, err := grpc.NewClient(flags.ProfileShareServer, opts...) if err != nil { return fmt.Errorf("failed to create gRPC connection to ProfileShareServer: %s, %w", flags.ProfileShareServer, err) } @@ -720,7 +720,7 @@ func runForwarder( })) } - conn, err := grpc.Dial(flags.StoreAddress, opts...) + conn, err := grpc.NewClient(flags.StoreAddress, opts...) if err != nil { return fmt.Errorf("failed to create gRPC connection: %w", err) } diff --git a/pkg/parca/parca_test.go b/pkg/parca/parca_test.go index fa81f5bda93..c7180b40f22 100644 --- a/pkg/parca/parca_test.go +++ b/pkg/parca/parca_test.go @@ -54,7 +54,7 @@ import ( ) func getShareServerConn(t Testing) sharepb.ShareServiceClient { - conn, err := grpc.Dial("api.pprof.me:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))) + conn, err := grpc.NewClient("api.pprof.me:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))) require.NoError(t, err) return sharepb.NewShareServiceClient(conn) } @@ -86,7 +86,7 @@ func benchmarkSetup(ctx context.Context, b *testing.B) (profilestorepb.ProfileSt var conn grpc.ClientConnInterface err := backoff.Retry(func() error { var err error - conn, err = grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err = grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { // b.Logf("failed to connect to parca: %v", err) return err diff --git a/pkg/query/columnquery_test.go b/pkg/query/columnquery_test.go index 629d75dfda1..0ca88c3fc26 100644 --- a/pkg/query/columnquery_test.go +++ b/pkg/query/columnquery_test.go @@ -53,7 +53,7 @@ import ( ) func getShareServerConn(t Testing) sharepb.ShareServiceClient { - conn, err := grpc.Dial("api.pprof.me:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))) + conn, err := grpc.NewClient("api.pprof.me:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))) require.NoError(t, err) return sharepb.NewShareServiceClient(conn) }