grpc.WithInsecure is deprecated: use insecure.NewCredentials() instead
Full error message
Hey I'm trying make a small test client with Go and Grpc,
opts := grpc.WithInsecure()
cc, err := grpc.Dial("localhost:9950", opts)
if err != nil {
log.Fatal(err)
}
The WithInsecure() function call gives a warning:
grpc.WithInsecure is deprecated: use insecure.NewCredentials() instead.
I'm not sure how to use this new function call is there an example somewhere? ThanksSolutionsource: stackoverflow \u2197
The function insecure.NewCredentials returns an implementation of credentials.TransportCredentials. You can use it as a DialOption with grpc.WithTransportCredentials: grpc.Dial(":9950", grpc.WithTransportCredentials(insecure.NewCredentials()))
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/5afa87b2efa223694c4da26765ef37bfac31249d8f518830227a918657fe98dfhash \u00b7 5afa87b2efa223694c4da26765ef37bfac31249d8f518830227a918657fe98df