From a65e0e95d618bc7437d80acb529a9568cce7b44c Mon Sep 17 00:00:00 2001 From: Hoshina Date: Fri, 20 Mar 2026 15:45:27 +0800 Subject: [PATCH] fix: lint err --- pkg/agent/eventbus_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/agent/eventbus_test.go b/pkg/agent/eventbus_test.go index dadbc2f94..13f2f2282 100644 --- a/pkg/agent/eventbus_test.go +++ b/pkg/agent/eventbus_test.go @@ -357,7 +357,7 @@ func TestAgentLoop_EmitsContextCompressEventOnRetry(t *testing.T) { }, } - contextErr := errString("InvalidParameter: Total tokens of image and text exceed max message tokens") + contextErr := stringError("InvalidParameter: Total tokens of image and text exceed max message tokens") provider := &failFirstMockProvider{ failures: 1, failError: contextErr, @@ -630,9 +630,9 @@ func findEvent(events []Event, kind EventKind) (Event, bool) { return Event{}, false } -type errString string +type stringError string -func (e errString) Error() string { +func (e stringError) Error() string { return string(e) } @@ -675,5 +675,7 @@ func (t *asyncFollowUpTool) ExecuteAsync( return tools.AsyncResult("async follow-up scheduled") } -var _ tools.Tool = (*mockCustomTool)(nil) -var _ tools.AsyncExecutor = (*asyncFollowUpTool)(nil) +var ( + _ tools.Tool = (*mockCustomTool)(nil) + _ tools.AsyncExecutor = (*asyncFollowUpTool)(nil) +)