@@ -19,7 +19,7 @@ func init() {
1919
2020func TestAdapterProtocol (t * testing.T ) {
2121 a := New (nil , nil )
22- defer func () { _ = a .Close () } ()
22+ defer a .Close ()
2323 if a .Protocol () != "acp" {
2424 t .Errorf ("Protocol() = %q" , a .Protocol ())
2525 }
@@ -56,7 +56,7 @@ func TestAdapterSend(t *testing.T) {
5656 defer server .Close ()
5757
5858 adapter := New (nil , server .Client ())
59- defer func () { _ = adapter .Close () } ()
59+ defer adapter .Close ()
6060
6161 env := envelope .New ("alice" , "echo" , protocol .ProtocolACP , []byte ("do something" ))
6262 env .Metadata ["acp.endpoint" ] = server .URL
@@ -90,7 +90,7 @@ func TestAdapterSend(t *testing.T) {
9090
9191func TestAdapterSendMissingEndpoint (t * testing.T ) {
9292 adapter := New (nil , nil )
93- defer func () { _ = adapter .Close () } ()
93+ defer adapter .Close ()
9494
9595 env := envelope .New ("a" , "b" , protocol .ProtocolACP , []byte ("test" ))
9696 err := adapter .Send (context .Background (), env )
@@ -101,7 +101,7 @@ func TestAdapterSendMissingEndpoint(t *testing.T) {
101101
102102func TestAdapterTranslateToA2A (t * testing.T ) {
103103 adapter := New (nil , nil )
104- defer func () { _ = adapter .Close () } ()
104+ defer adapter .Close ()
105105
106106 msg := Message {
107107 Role : "agent" ,
@@ -121,7 +121,7 @@ func TestAdapterTranslateToA2A(t *testing.T) {
121121
122122func TestAdapterTranslateSame (t * testing.T ) {
123123 adapter := New (nil , nil )
124- defer func () { _ = adapter .Close () } ()
124+ defer adapter .Close ()
125125
126126 env := envelope .New ("a" , "b" , protocol .ProtocolACP , []byte ("test" ))
127127 translated , err := adapter .Translate (context .Background (), env , "acp" )
@@ -135,7 +135,7 @@ func TestAdapterTranslateSame(t *testing.T) {
135135
136136func TestHandleListAgents (t * testing.T ) {
137137 adapter := New (nil , nil )
138- defer func () { _ = adapter .Close () } ()
138+ defer adapter .Close ()
139139
140140 httpReq := httptest .NewRequest (http .MethodGet , "/acp/agents" , nil )
141141 w := httptest .NewRecorder ()
@@ -155,7 +155,7 @@ func TestHandleListAgents(t *testing.T) {
155155
156156func TestHandleGetAgent (t * testing.T ) {
157157 adapter := New (nil , nil )
158- defer func () { _ = adapter .Close () } ()
158+ defer adapter .Close ()
159159
160160 httpReq := httptest .NewRequest (http .MethodGet , "/acp/agents/echo" , nil )
161161 httpReq .SetPathValue ("name" , "echo" )
@@ -176,7 +176,7 @@ func TestHandleGetAgent(t *testing.T) {
176176
177177func TestHandleCreateRun (t * testing.T ) {
178178 adapter := New (nil , nil )
179- defer func () { _ = adapter .Close () } ()
179+ defer adapter .Close ()
180180
181181 req := CreateRunRequest {
182182 AgentName : "echo" ,
@@ -220,7 +220,7 @@ func TestHandleCreateRun(t *testing.T) {
220220
221221func TestHandleCreateRun_MissingAgent (t * testing.T ) {
222222 adapter := New (nil , nil )
223- defer func () { _ = adapter .Close () } ()
223+ defer adapter .Close ()
224224
225225 req := CreateRunRequest {Input : []Message {}}
226226 body , _ := json .Marshal (req )
@@ -237,7 +237,7 @@ func TestHandleCreateRun_MissingAgent(t *testing.T) {
237237
238238func TestHandleGetRun (t * testing.T ) {
239239 adapter := New (nil , nil )
240- defer func () { _ = adapter .Close () } ()
240+ defer adapter .Close ()
241241
242242 run := & Run {RunID : "run-1" , Status : RunStatusCompleted , AgentName : "echo" }
243243 adapter .runs .Store ("run-1" , run )
@@ -261,7 +261,7 @@ func TestHandleGetRun(t *testing.T) {
261261
262262func TestHandleGetRun_NotFound (t * testing.T ) {
263263 adapter := New (nil , nil )
264- defer func () { _ = adapter .Close () } ()
264+ defer adapter .Close ()
265265
266266 httpReq := httptest .NewRequest (http .MethodGet , "/acp/runs/unknown" , nil )
267267 httpReq .SetPathValue ("run_id" , "unknown" )
@@ -276,7 +276,7 @@ func TestHandleGetRun_NotFound(t *testing.T) {
276276
277277func TestHandleCancelRun (t * testing.T ) {
278278 adapter := New (nil , nil )
279- defer func () { _ = adapter .Close () } ()
279+ defer adapter .Close ()
280280
281281 run := & Run {RunID : "run-1" , Status : RunStatusInProgress }
282282 adapter .runs .Store ("run-1" , run )
@@ -300,7 +300,7 @@ func TestHandleCancelRun(t *testing.T) {
300300
301301func TestHandlePing (t * testing.T ) {
302302 adapter := New (nil , nil )
303- defer func () { _ = adapter .Close () } ()
303+ defer adapter .Close ()
304304
305305 httpReq := httptest .NewRequest (http .MethodGet , "/acp/ping" , nil )
306306 w := httptest .NewRecorder ()
@@ -314,7 +314,7 @@ func TestHandlePing(t *testing.T) {
314314
315315func TestInjectMessage (t * testing.T ) {
316316 adapter := New (nil , nil )
317- defer func () { _ = adapter .Close () } ()
317+ defer adapter .Close ()
318318
319319 env := envelope .New ("test" , "dest" , protocol .ProtocolACP , []byte ("test" ))
320320 if err := adapter .InjectMessage (env ); err != nil {
0 commit comments