grpc报错 grpc.WithInsecure is deprecated: use insecure.NewCredentials() instead

使用grpc.Dial()的时候,提示了grpc.WithInsecure已弃用,

解决方案,如下

grpc.Dial("127.0.0.1:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))

https://pkg.go.dev/google.golang.org/grpc@v1.43.0#WithTransportCredentials

Comments

Popular posts from this blog

什么是smart原则

【Protocol Buffer】简介和安装

Novice running training plan: How to run 5 kilometers in 30 minutes?