Remove unused lock dispatcher

This commit is contained in:
2026-09-05 14:17:22 +00:00
parent 6c66e18c4b
commit 6d07dafc9f
2 changed files with 1 additions and 16 deletions

View File

@@ -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] {

View File

@@ -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)