Versions in this module Expand all Collapse all v0 v0.14.0 Jul 22, 2026 v0.12.1 Jul 4, 2026 Changes in this version + func AppendBlock(output *[]string, block []string) + func BuildKeyLine(base KeyLine, key string, value string, commented bool) string + func CloneLines(lines []string) []string + func CommentForLine(lines []string, lineIndex int) string + func ContainsUnescapedTripleQuote(s string) bool + func EnsureCommented(line string) string + func ExtractBlockKeyValue(lines []string, key string) string + func ExtractInlineCommentWithState(line string, state StringState) string + func FindInsertIndex(lines []string, afterKey string) int + func FormatDottedKeyPath(path []string) string + func FormatKey(key string) string + func FormatValue(value any) string + func InlineCommentForLine(lines []string, lineIndex int) string + func MultilineValueEndIndex(lines []string, startIdx int) int + func ParseHeader(line string) (string, bool, bool) + func ParseKeyPath(input string) ([]string, bool) + func ParseKeyValueWithState(line string, key string, state StringState) (string, string, bool) + func RemoveKeyFromBlock(block *Block, key string) + func ReplaceOrInsertLine(block *Block, key string, newLine string, afterKey string) + func SetCommentedKeyLine(block *Block, templateBlock *Block, key string, afterKey string) + func SetKeyValue(block *Block, templateBlock *Block, key string, value string, afterKey string) + func StateInMultiline(state StringState) bool + func TrimEmptyLines(lines []string) []string + func TrimTrailingEmptyLines(lines []string) []string + func WalkLinesOutsideMultiline(lines []string, fn func(i int, line string, state StringState) LineWalkResult) + type Block struct + Lines []string + Name string + type Document struct + Arrays map[string][]*Block + Order []string + Preamble []string + Sections map[string]*Block + func ParseDocument(content string) Document + type KeyLine struct + Commented bool + Indent string + InlineComment string + Raw string + func FindKeyLine(lines []string, key string) (KeyLine, bool) + func ParseDottedPrefixLine(line string, key string) (KeyLine, bool) + func ParseKeyLineWithState(line string, key string, state StringState) (KeyLine, bool) + type LineWalkResult struct + AdvanceTo int + Stop bool + type StringState int + const StateBasic + const StateLiteral + const StateMultiBasic + const StateMultiLiteral + const StateNone + func ScanLineForComment(line string, state StringState) (commentPos int, nextState StringState)