yaml

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(f *ast.File, p string) (*yaml.Path, ast.Node, bool, error)

Get takes an ast.File and a string representing a path and returns the yaml.Path, the node and a bool indicating if the node exists.

func GetValue

func GetValue(node ast.Node) (interface{}, error)

GetValue returns the value of the node.

func MarshalFile

func MarshalFile(f *ast.File, addNewLine bool) []byte

MarshalFile returns the representation of the ast.File to a byte slice.

func Update

func Update(f *ast.File, path *yaml.Path, value interface{}) error

Update marshals the value and replaces the file at the path provided with the new value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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