Skip to content

dead code: generated audit search command is silently dropped at startup #149

Description

@ysyneu

Spotted while tracing the cligen timestamp-desc work (#148): internal/cli/zz_generated_audit_logs.go's genAuditLogsSearchCmd registers a search leaf under the audit group (genAddLeaf(gAudit, genAuditLogsSearchCmd())), but the curated audit.go's newAuditSearchCmd() registers the same name first, so the generated command is always dropped at startup.

Two paths to close it:

  1. Teach cligen to skip generating commands that a curated command already owns (the generator has the 'harmlessly dropped' fallback for other collisions — audit's case just isn't covered).
  2. Or drop the generated registration for audit search explicitly.

Left as-is in #148 because it was out of scope; filing so it doesn't get lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions