From 03dce65e27c2ad85bd13981ed52e4e498cd997ae Mon Sep 17 00:00:00 2001 From: Greg B Date: Thu, 22 Jan 2026 09:43:46 -0500 Subject: [PATCH] :bug: Add missing WithService(nil) in setModerationStatus The setModerationStatus command was missing the comment.WithService(nil) call that all other comment commands have (delete, insert, list, markAsSpam, update). This caused a nil pointer dereference when calling SetModerationStatus() because the YouTube API service was never initialized. Fixes panic: runtime error: invalid memory address or nil pointer dereference Co-Authored-By: Claude --- cmd/comment/setModerationStatus.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/comment/setModerationStatus.go b/cmd/comment/setModerationStatus.go index c97b9e0..ddbefa9 100644 --- a/cmd/comment/setModerationStatus.go +++ b/cmd/comment/setModerationStatus.go @@ -142,6 +142,7 @@ func setModerationStatus(writer io.Writer) error { comment.WithIDs(ids), comment.WithModerationStatus(moderationStatus), comment.WithBanAuthor(banAuthor), + comment.WithService(nil), ) return c.SetModerationStatus(output, jpath, writer)