From 6d07dafc9fa62d05dafee7f2844ca89464f14928 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sat, 5 Sep 2026 14:17:22 +0000 Subject: [PATCH] Remove unused lock dispatcher --- internal/app/operator_helpers.go | 2 +- internal/app/operator_locks.go | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/internal/app/operator_helpers.go b/internal/app/operator_helpers.go index 3f2bcd0..ad4d6b9 100644 --- a/internal/app/operator_helpers.go +++ b/internal/app/operator_helpers.go @@ -71,7 +71,7 @@ func Session(ctx context.Context, args []string, out io.Writer) error { } // SessionLocks dispatches session-oriented publish lock list and mutation -// helpers while preserving the existing lock implementations. +// helpers. func SessionLocks(ctx context.Context, args []string, out io.Writer) error { if len(args) > 0 && !isCLIFlagToken(args[0]) { switch args[0] { diff --git a/internal/app/operator_locks.go b/internal/app/operator_locks.go index 38b091e..087eaf0 100644 --- a/internal/app/operator_locks.go +++ b/internal/app/operator_locks.go @@ -14,21 +14,6 @@ import ( "gitea.maximumdirect.net/eric/narratio/internal/config" ) -// Locks dispatches publish lock list and mutation helpers. -func Locks(ctx context.Context, args []string, out io.Writer) error { - if len(args) > 0 && !strings.HasPrefix(args[0], "-") { - switch args[0] { - case "add": - return LocksAdd(ctx, args[1:], out) - case "remove": - return LocksRemove(ctx, args[1:], out) - default: - return fmt.Errorf("locks: unknown subcommand %q", args[0]) - } - } - return LocksList(ctx, args, out) -} - // LocksList lists independent publish locks. func LocksList(ctx context.Context, args []string, out io.Writer) error { fs := flag.NewFlagSet("locks", flag.ContinueOnError)