Documentation
¶
Overview ¶
Package ghaoutput writes step outputs to the file named by $GITHUB_OUTPUT, using plain key=value lines for single-line values and randomized heredoc delimiters for multiline values so untrusted content cannot forge additional outputs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLine ¶ added in v0.16.1
FormatLine renders one $GITHUB_OUTPUT entry. Single-line values use the plain key=value form. Values containing a newline use GitHub's documented heredoc form with a random per-value delimiter: output values can carry arbitrary text (commit messages reach changelog outputs), and with a fixed or key-derived delimiter a value containing that delimiter as a bare line terminates the block early, so the remaining lines parse as forged outputs.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer handles writing outputs to GitHub Actions $GITHUB_OUTPUT file
func (*Writer) Flush ¶
Flush writes all outputs to $GITHUB_OUTPUT or stdout. The error return is named so the deferred Close can surface a failure to persist the buffered content; with an unnamed return the deferred assignment would mutate a local after the return value was already copied, silently dropping the flush-to-disk error.
func (*Writer) SetMultiline ¶
SetMultiline sets a multiline output value