Documentation
¶
Index ¶
- func FormatCodeDetails(summary, code string) string
- func FormatDetails(summary, content string) string
- func HeadingPrefix(level int) string
- func ParseResultFiles(stdout string) []string
- func WriteHeader(w io.Writer, title string, headerLevel int) error
- func WriteList(w io.Writer, results []common.RepoResult, reposRoot string, headerLevel int) error
- func WriteLsFiles(w io.Writer, r common.Result, headerLevel int) error
- func WriteLsFilesSummary(w io.Writer, results []common.Result, headerLevel int) error
- func WriteRepo(w io.Writer, r common.RepoResult, headerLevel int) error
- func WriteResult(w io.Writer, r common.Result, headerLevel int) error
- func WriteSummary(w io.Writer, results []common.Result, headerLevel int) error
- func WriteWorktreeList(w io.Writer, results []common.WorktreeResult, worktreeRoot string, ...) error
- type Details
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCodeDetails ¶
FormatCodeDetails formats summary and code text wrapped in a markdown code block within a <details> element.
func FormatDetails ¶
FormatDetails formats summary and content as a markdown <details> block.
func HeadingPrefix ¶
HeadingPrefix returns the markdown heading prefix for a given level (clamped to 1-6).
func ParseResultFiles ¶
ParseResultFiles parses stdout lines into non-empty file paths.
func WriteHeader ¶
WriteHeader writes a top-level Markdown heading for a command execution. titleLevel is typically headerLevel - 1 (clamped to 1-6).
func WriteList ¶
WriteList writes the complete list output in Markdown format: a top heading, a bullet list of repositories, and a summary section.
func WriteLsFiles ¶
WriteLsFiles writes an individual repository's ls-files Result formatted as Markdown.
func WriteLsFilesSummary ¶
WriteLsFilesSummary writes an aggregate summary for multiple ls-files Results.
func WriteResult ¶
WriteResult writes Result formatted as a Markdown section. The heading is "<h> <repo>: exit code = <code>" using headerLevel (clamped to 1-6). stdout/stderr are wrapped in collapsible <details> blocks.
func WriteSummary ¶
WriteSummary writes an aggregate summary for multiple Results.
func WriteWorktreeList ¶ added in v0.4.0
func WriteWorktreeList(w io.Writer, results []common.WorktreeResult, worktreeRoot string, headerLevel int) error
WriteWorktreeList writes the complete worktree list output in Markdown format: a top heading, a list of worktrees with branch and main repository paths, and a summary section.
Types ¶
type Details ¶
Details represents an HTML <details><summary>...</summary>...</details> collapsible block.
func NewCodeDetails ¶
NewCodeDetails creates a Details block with code content wrapped in triple backticks.