From d40957974ce462f933ddd3b0e76236460205fc7a Mon Sep 17 00:00:00 2001 From: ShenQingchuan Date: Sun, 29 Mar 2026 13:30:59 +0800 Subject: [PATCH] fix(ci): satisfy golines and gosmopolitan in cron code --- pkg/tools/cron.go | 5 ++++- pkg/tools/cron_test.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/tools/cron.go b/pkg/tools/cron.go index 78fbc3f88..60d9d5e5a 100644 --- a/pkg/tools/cron.go +++ b/pkg/tools/cron.go @@ -393,7 +393,10 @@ func (t *CronTool) ExecuteJob(ctx context.Context, job *cron.CronJob) string { prompt := job.Payload.Message if isDirective { // For directive type, prefix to clarify this is an instruction - prompt = fmt.Sprintf("Please execute the following directive and provide the result:\n\n%s", job.Payload.Message) + prompt = fmt.Sprintf( + "Please execute the following directive and provide the result:\n\n%s", + job.Payload.Message, + ) } // Call agent with the prepared prompt diff --git a/pkg/tools/cron_test.go b/pkg/tools/cron_test.go index 2185fcde6..186c6a75e 100644 --- a/pkg/tools/cron_test.go +++ b/pkg/tools/cron_test.go @@ -329,7 +329,7 @@ func TestCronTool_ExecuteJobSkipsEmptyAgentResponse(t *testing.T) { } func TestCronTool_ExecuteJobSkipsWhenMessageToolAlreadySent(t *testing.T) { - executor := &stubJobExecutor{response: "已发送。", alreadySent: true} + executor := &stubJobExecutor{response: "Sent.", alreadySent: true} tool := newTestCronToolWithExecutorAndConfig(t, executor, config.DefaultConfig()) job := &cron.CronJob{ID: "job-msg-sent"}