From f1ce027a6a9cb86e502803de85983fe6193cb832 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 8 Jun 2026 05:03:02 +0200 Subject: [PATCH 1/3] refactor(queue): remove unused worker loop --- internal/routing/queue/queue.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/internal/routing/queue/queue.go b/internal/routing/queue/queue.go index c8d0f23..a074d28 100644 --- a/internal/routing/queue/queue.go +++ b/internal/routing/queue/queue.go @@ -20,22 +20,6 @@ func New(size int) *Queue { return &Queue{ch: make(chan Task, size)} } -func (q *Queue) Start(ctx context.Context) { - for { - select { - case <-ctx.Done(): - return - case task, ok := <-q.ch: - if !ok { - return - } - if task != nil { - _ = task(ctx) - } - } - } -} - func (q *Queue) Enqueue(task Task) bool { q.mu.Lock() defer q.mu.Unlock() From a236c053b0b5d764bf7318ad8252bd8c6d03cf6a Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 8 Jun 2026 05:03:02 +0200 Subject: [PATCH 2/3] ci: add deadcode check --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26f08dc..d13efcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,12 @@ jobs: go-version-file: go.mod cache: true + - name: Install deadcode + run: go install golang.org/x/tools/cmd/deadcode@v0.45.0 + + - name: Deadcode + run: '"$(go env GOPATH)/bin/deadcode" -test ./...' + - name: Test run: go test ./... From f517b0bf111bfe034666f109f175bb821a0fd420 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 8 Jun 2026 05:17:24 +0200 Subject: [PATCH 3/3] ci: enforce deadcode gate --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d13efcb..17960b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,13 @@ jobs: run: go install golang.org/x/tools/cmd/deadcode@v0.45.0 - name: Deadcode - run: '"$(go env GOPATH)/bin/deadcode" -test ./...' + run: | + output_file=$(mktemp) + "$(go env GOPATH)/bin/deadcode" -test ./... > "$output_file" + if [ -s "$output_file" ]; then + cat "$output_file" + exit 1 + fi - name: Test run: go test ./...