From f32bf6f3bacff100855b1c99c19fbd3cb41403d6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 10:00:10 +0100 Subject: [PATCH] ax(mining): replace prose comment on NewTaskSupervisor with usage example AX Principle 2: comments show HOW with real values, not WHAT the function name already says. All other constructors in the file already use usage-example comments; NewTaskSupervisor was the outlier. Co-Authored-By: Charon --- pkg/mining/supervisor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/mining/supervisor.go b/pkg/mining/supervisor.go index fdb6e8d..4b9496d 100644 --- a/pkg/mining/supervisor.go +++ b/pkg/mining/supervisor.go @@ -34,7 +34,9 @@ type TaskSupervisor struct { started bool } -// NewTaskSupervisor creates a new task supervisor. +// supervisor := NewTaskSupervisor() +// supervisor.RegisterTask("stats-collector", collectStats, 5*time.Second, -1) +// supervisor.Start() func NewTaskSupervisor() *TaskSupervisor { ctx, cancel := context.WithCancel(context.Background()) return &TaskSupervisor{