Documentation
¶
Index ¶
- func CleanUpYaml(value string) string
- func CommonSlicePrefix(a, b []string) []string
- func GetLineIndentation(line string) string
- func GetLineNumberForDoc(content string, docIndex int) (int, error)
- func GetLineNumberFromMatch(content string, match string, docIndex int) (int, error)
- func GetLineNumberFromYamlPath(content string, path string, docIndex int) (int, error)
- func GetStringInBetween(str, start, end string) string
- func IsLineEmpty(line string) bool
- func TryGetLineNumberFromValue(value string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUpYaml ¶
CleanUpYaml removes lines that only contain comments or are empty also removes trailing comments after the "---" multi doc separator
func CommonSlicePrefix ¶
CommonSlicePrefix returns the common prefix of two string slices
func GetLineIndentation ¶
GetLineIndentation returns the indentation (whitespace prefix) of a line
func GetLineNumberForDoc ¶
GetLineNumberForDoc returns the line number of the first line of a document (disregards empty lines and comments)
func GetLineNumberFromMatch ¶
GetLineNumberFromMatch returns the line number for a given substring in "content"
func GetLineNumberFromYamlPath ¶
GetLineNumberFromYamlPath returns the line number in a yaml text given the yaml path pass 0 as docIndex in case of a single yaml document
func GetStringInBetween ¶
GetStringInBetween returns empty string if no start/end string found
func IsLineEmpty ¶
IsLineEmpty returns true if a line is empty or a comment
func TryGetLineNumberFromValue ¶
TryGetLineNumberFromValue attempts to extract a line number from an error message
Types ¶
This section is empty.