Skip to content

Commit fe9f17b

Browse files
authored
Merge pull request #2416 from alexandear/guestagent/refactor-grpc-newclient
guestagent: refactor to grpc.NewClient
2 parents ea92a26 + f996826 commit fe9f17b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/guestagent/api/client/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/lima-vm/lima/pkg/guestagent/api"
88
"google.golang.org/grpc"
9+
"google.golang.org/grpc/resolver"
910
"google.golang.org/protobuf/types/known/emptypb"
1011
)
1112

@@ -21,7 +22,8 @@ func NewGuestAgentClient(dialFn func(ctx context.Context) (net.Conn, error)) (*G
2122
grpc.WithTransportCredentials(NewCredentials()),
2223
}
2324

24-
clientConn, err := grpc.Dial("", opts...) //nolint:staticcheck // SA1019: grpc.Dial is deprecated: use NewClient instead. Will be supported throughout 1.x
25+
resolver.SetDefaultScheme("passthrough")
26+
clientConn, err := grpc.NewClient("", opts...)
2527
if err != nil {
2628
return nil, err
2729
}

0 commit comments

Comments
 (0)