Skip to content

Commit 0404b08

Browse files
author
Steve Ayers
committed
Cleanup
Signed-off-by: Steve Ayers <[email protected]>
1 parent 0f401b2 commit 0404b08

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ func (c *Client[Req, Res]) CallUnary(ctx context.Context, request *Request[Req])
152152
return resp, nil
153153
}
154154

155-
// CallUnary calls a request-response procedure.
155+
// CallUnarySimple calls a request-response procedure using the function signature
156+
// associated with the "simple" generation option.
157+
//
158+
// This option eliminates the [Request] and [Response] wrappers, and instead uses the
159+
// context.Context to propagate information such as headers.
156160
func (c *Client[Req, Res]) CallUnarySimple(ctx context.Context, request *Req) (*Res, error) {
157161
response, err := c.CallUnary(ctx, requestFromOutgoingContext(ctx, request))
158162
if response != nil {

connect_ext_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ func TestCallInfo(t *testing.T) {
107107
assert.True(t, callInfo.Spec().IsClient)
108108
assert.Equal(t, callInfo.Peer().Addr, httptest.DefaultRemoteAddr)
109109
assert.Equal(t, callInfo.ResponseHeader().Values(handlerHeader), []string{headerValue})
110-
// assert.Equal(t, callInfo.ResponseTrailer().Values(handlerTrailer), []string{trailerValue})
111110
})
112111
})
113112
t.Run("generics_api", func(t *testing.T) {
@@ -157,8 +156,6 @@ func TestCallInfo(t *testing.T) {
157156
assert.Nil(t, stream.Close())
158157
assert.Equal(t, stream.ResponseHeader().Values(handlerHeader), []string{headerValue})
159158
assert.Equal(t, callInfo.ResponseHeader().Values(handlerHeader), []string{headerValue})
160-
// assert.Equal(t, stream.ResponseTrailer().Values(handlerTrailer), []string{trailerValue})
161-
// assert.Equal(t, callInfo.ResponseTrailer().Values(handlerTrailer), []string{trailerValue})
162159
})
163160
})
164161
}

0 commit comments

Comments
 (0)