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

微服务科普

ESXi添加USB硬盘作为数据存储

油焖大虾菜谱