Documentation
¶
Overview ¶
Package tools provides general utility functions used across the application. This includes helpers for file I/O, Markdown generation, and other common tasks that don't fit into more specific domain packages.
Index ¶
- func AppendFencedCodeBlock(buf *bytes.Buffer, content string, languageHint string)
- func AppendFileMarkerFooter(buf *bytes.Buffer, filePath string)
- func AppendFileMarkerHeader(buf *bytes.Buffer, filePath string)
- func AppendSectionHeader(buf *bytes.Buffer, title string)
- func ReadFileContent(filePath string) ([]byte, error)
- func WriteBufferToFile(filePath string, buf *bytes.Buffer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFencedCodeBlock ¶
AppendFencedCodeBlock adds a standard Markdown fenced code block to the buffer.
func AppendFileMarkerFooter ¶
AppendFileMarkerFooter adds the explicit file end marker.
func AppendFileMarkerHeader ¶
AppendFileMarkerHeader adds the explicit file start marker.
func AppendSectionHeader ¶
AppendSectionHeader adds a standard Markdown H3 section header to the buffer.
func ReadFileContent ¶
ReadFileContent reads the entire content of the file at the specified path. Returns the content as a byte slice or an error if reading fails.
func WriteBufferToFile ¶
WriteBufferToFile writes the content of a bytes.Buffer to the specified file path. It uses default file permissions (0600). It prints informational messages about writing to os.Stdout. TODO: Refactor to remove direct fmt.Printf calls.
Calling commands should use their Presenter for user-facing messages or a Logger for debug/trace information related to file writing. This function should focus solely on writing the file.
Types ¶
This section is empty.