argument ctx is overwritten before first use
42)
43
44// BidirectionalStream represents gRPC bidirectional stream server handler.
45func BidirectionalStream(ctx context.Context, stream ServerStream, 46 concurrency int,
47 newData func() interface{},
48 f func(context.Context, interface{}) (interface{}, error),
Description
The function argument is overwritten before the passed value is read.
Bad practice
func (arg string) {
arg = "foo bar"
}
Recommended
func (arg string) {
use(arg)
arg = "foo bar"
}