Package list golang-github-go-kit-kit / bf7c05f
Added note on usage of reflect.Indirect in grpc.NewClient Bas van Beek 6 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3737 method: fmt.Sprintf("/pb.%s/%s", serviceName, method),
3838 enc: enc,
3939 dec: dec,
40 // We are using reflect.Indirect here to allow both reply structs and
41 // pointers to these reply structs. New consumers of the client should
42 // use structs directly, while existing consumers will not break if they
43 // remain to use pointers to structs.
4044 grpcReply: reflect.TypeOf(
4145 reflect.Indirect(
4246 reflect.ValueOf(grpcReply),