Documentation
¶
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 CaptureCommandOutput(cwd string, commandName string, args ...string) (string, error)
- func CaptureGitOutput(cwd string, args ...string) (string, error)
- func CheckGitPrereqs() (string, error)
- func CommandExists(name string) bool
- func ExecuteCommand(cwd, commandName string, args ...string) error
- func ExecuteGitCommand(cwd string, args ...string) error
- func GetCurrentBranchName(cwd string) (string, error)
- func IsGitRepo(dir string) bool
- func IsWorkingDirClean(cwd string) (bool, error)
- func LocalBranchExists(cwd, branchName string) (bool, error)
- func PromptForConfirmation(prompt string) (bool, error)
- func PromptForInput(prompt string) (string, error)
- func ReadFileContent(filePath string) ([]byte, error)
- func ReadMultilineInput(eofMarker string) (string, 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 CaptureCommandOutput ¶
CaptureCommandOutput executes an arbitrary command and captures its stdout. Returns stdout string and potentially an *exec.ExitError if the command exits non-zero.
func CaptureGitOutput ¶
CaptureGitOutput runs a git command and captures its stdout.
func CheckGitPrereqs ¶
CheckGitPrereqs verifies 'git' command exists and current directory is a Git repo.
func CommandExists ¶
CommandExists checks if a command executable name is found in the system's PATH.
func ExecuteCommand ¶
ExecuteCommand runs an arbitrary command, piping stdio. Returns an error if the command fails, including the exit code in the error message.
func ExecuteGitCommand ¶
ExecuteGitCommand runs a git command, piping stdio.
func GetCurrentBranchName ¶
GetCurrentBranchName retrieves the current Git branch name.
func IsWorkingDirClean ¶
IsWorkingDirClean checks for staged, unstaged, or untracked files.
func LocalBranchExists ¶
LocalBranchExists checks if a local branch exists.
func PromptForConfirmation ¶
PromptForConfirmation displays a prompt and expects a yes/no answer. Returns true for yes, false for no/default (Enter). Loops on invalid input.
func PromptForInput ¶
PromptForInput displays a prompt and reads a single line from stdin.
func ReadFileContent ¶
ReadFileContent reads the entire content of the file at the specified path.
func ReadMultilineInput ¶
ReadMultilineInput reads multiple lines from stdin until an eofMarker is encountered.
Types ¶
This section is empty.