File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,10 @@ func TestSSEServer(t *testing.T) {
3737
3838 var customClientUsed int64
3939 customClient := & http.Client {
40- Transport : & roundTripperFunc {
41- fn : func (req * http.Request ) (* http.Response , error ) {
42- atomic .AddInt64 (& customClientUsed , 1 )
43- return http .DefaultTransport .RoundTrip (req )
44- },
45- },
40+ Transport : roundTripperFunc (func (req * http.Request ) (* http.Response , error ) {
41+ atomic .AddInt64 (& customClientUsed , 1 )
42+ return http .DefaultTransport .RoundTrip (req )
43+ }),
4644 }
4745
4846 clientTransport := NewSSEClientTransport (httpServer .URL , & SSEClientTransportOptions {
@@ -182,10 +180,8 @@ func TestScanEvents(t *testing.T) {
182180}
183181
184182// roundTripperFunc is a helper to create a custom RoundTripper
185- type roundTripperFunc struct {
186- fn func (* http.Request ) (* http.Response , error )
187- }
183+ type roundTripperFunc func (* http.Request ) (* http.Response , error )
188184
189- func (f * roundTripperFunc ) RoundTrip (req * http.Request ) (* http.Response , error ) {
190- return f . fn (req )
185+ func (f roundTripperFunc ) RoundTrip (req * http.Request ) (* http.Response , error ) {
186+ return f (req )
191187}
You can’t perform that action at this time.
0 commit comments