From fdfe4aa62034c1646309cd563df7c223f8cb0b04 Mon Sep 17 00:00:00 2001 From: Robin Olsen <129996395+Telikz@users.noreply.github.com> Date: Thu, 12 Feb 2026 23:59:12 +0100 Subject: [PATCH] Update cmd/survey/survey.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cmd/survey/survey.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/survey/survey.go b/cmd/survey/survey.go index 74ac98a..a270790 100644 --- a/cmd/survey/survey.go +++ b/cmd/survey/survey.go @@ -21,18 +21,18 @@ func main() { } defer close() - tasks := initTasks() + surveyTasks := initTasks() interfaces := initInterfaces() - if err := taskLoop(ctx, svc, tasks, interfaces); err != nil { + if err := taskLoop(ctx, svc, surveyTasks, interfaces); err != nil { log.Fatalf("Task loop failed: %v\n", err) } } -func taskLoop(ctx context.Context, svc *service.Services, tasks []*tasks.Task, interfaces []tasks.Interface) error { +func taskLoop(ctx context.Context, svc *service.Services, surveyTasks []*tasks.Task, interfaces []tasks.Interface) error { interfaceIndex := rand.Int() % len(interfaces) - for _, task := range tasks { + for _, task := range surveyTasks { task.SetInterface(interfaces[interfaceIndex])