Better example. A method to request for exacly one element from the gRPC bistream. A thing that is frequently needed when there're lots of bistream gRPC methods.
https://go2goplay.golang.org/p/RQEyhRRQb0p IRL I would need to call it as resp, err := proto.ReadOne(service.Service_MethodClient, service.MethodRequest, service.MethodResponse)(ctx, client.Method, &service.MethodRequest{ … }) instead of simple to read resp, err := proto.ReadOne(ctx, client.Method, &service.MethodRequest{ … }) среда, 17 июня 2020 г., 19:43:35 UTC+3 пользователь Denis Cheremisov написал: > > https://go2goplay.golang.org/p/ObL79WVHDjw > > Need to write types explicitly although all the info needed is easily > accessible: > > fmt.Println(IsOK(*commonResponse, *commonError)(r)) > > What I am sure is I will keep using a code generator instead of this > monstrosity. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6bfdcc4c-dca8-4051-b89c-65274c2f6982o%40googlegroups.com.