util

package
v0.0.0-...-00182d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRelativeFile

func IsRelativeFile(root, relPath string) (string, error)

IsRelativeFile checks if the given string is a relative path to a file

func PrefixFirstYamlDocument

func PrefixFirstYamlDocument(line, file string) error

PrefixFirstYamlDocument inserts a line to the beginning of the first YAML document in a file having content

func ReadFileAndFixNewline

func ReadFileAndFixNewline(reader io.Reader) ([]byte, error)

ReadFileAndFixNewline reads the content of a io.Reader and replaces \r\n with \n

func RemoveCommentsFromYaml

func RemoveCommentsFromYaml(reader io.Reader) ([]byte, error)

RemoveCommentsFromYaml tries to remove comments if they contain valid yaml

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL