diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2020-03-24 14:38:14 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-03-24 14:38:14 +0300 |
commit | d077e4084a4ca3416efc3da8ecd3033c3b17409c (patch) | |
tree | 027981e944b836ad119832e5f8f34b2505b16874 /internal/praefect/grpc-proxy | |
parent | e8458d46dbfbd620627142a9e718de8e63b559cf (diff) |
Replace calls to new with address of literal
Diffstat (limited to 'internal/praefect/grpc-proxy')
-rw-r--r-- | internal/praefect/grpc-proxy/proxy/peeker_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/praefect/grpc-proxy/proxy/peeker_test.go b/internal/praefect/grpc-proxy/proxy/peeker_test.go index d6efb9fb7..b5d882ff4 100644 --- a/internal/praefect/grpc-proxy/proxy/peeker_test.go +++ b/internal/praefect/grpc-proxy/proxy/peeker_test.go @@ -32,7 +32,7 @@ func TestStreamPeeking(t *testing.T) { peekedMsg, err := peeker.Peek() require.NoError(t, err) - peekedRequest := new(testservice.PingRequest) + peekedRequest := &testservice.PingRequest{} err = proto.Unmarshal(peekedMsg, peekedRequest) require.NoError(t, err) require.True(t, proto.Equal(pingReqSent, peekedRequest), "expected to be the same") @@ -91,7 +91,7 @@ func TestStreamInjecting(t *testing.T) { peekedMsg, err := peeker.Peek() require.NoError(t, err) - peekedRequest := new(testservice.PingRequest) + peekedRequest := &testservice.PingRequest{} require.NoError(t, proto.Unmarshal(peekedMsg, peekedRequest)) require.Equal(t, "hi", peekedRequest.GetValue()) |