Documentation
¶
Index ¶
Constants ¶
const MaxHeredocBodyBytes = 1 << 20
MaxHeredocBodyBytes bounds the decoded payload retained by one heredoc.
Variables ¶
This section is empty.
Functions ¶
func DecodeQuoted ¶
DecodeQuoted decodes one JSON-compatible quoted operand and returns the unconsumed source. Literal horizontal tabs are normalized to the equivalent JSON escape before decoding; every other quoted-string validation rule is retained.
Types ¶
type CommandFrame ¶
CommandFrame describes one inline command or complete heredoc command.
func FrameCommand ¶
func FrameCommand(lines []PhysicalLine, headerIndex int, command string) (CommandFrame, error)
FrameCommand returns the complete physical-line span and decoded body for the command at headerIndex. Malformed frames retain their attributable lines so parsers and diagnostics do not reinterpret payload-shaped data as commands.
type PhysicalLine ¶
PhysicalLine retains a script line's exact terminator separately from its text.
func SplitPhysicalLines ¶
func SplitPhysicalLines(source string) []PhysicalLine
SplitPhysicalLines splits LF and CRLF scripts without losing body terminators.