{"id":1255,"hash":"5afa87b2efa223694c4da26765ef37bfac31249d8f518830227a918657fe98df","pattern":"grpc.WithInsecure is deprecated: use insecure.NewCredentials() instead","full_message":"Hey I'm trying make a small test client with Go and Grpc,\n\nopts := grpc.WithInsecure()\n    cc, err := grpc.Dial(\"localhost:9950\", opts)\n    if err != nil {\n        log.Fatal(err)\n    }\n\nThe WithInsecure() function call gives a warning:\n\ngrpc.WithInsecure is deprecated: use insecure.NewCredentials() instead.\n\nI'm not sure how to use this new function call is there an example somewhere? Thanks","ecosystem":"go","package_name":"grpc","package_version":null,"solution":"The function insecure.NewCredentials returns an implementation of credentials.TransportCredentials.\n\nYou can use it as a DialOption with grpc.WithTransportCredentials:\n\ngrpc.Dial(\":9950\", grpc.WithTransportCredentials(insecure.NewCredentials()))","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/70482508/grpc-withinsecure-is-deprecated-use-insecure-newcredentials-instead","votes":31,"created_at":"2026-04-19T04:52:44.557582+00:00","updated_at":"2026-04-19T04:52:44.557582+00:00"}