yamled

package
v2.20.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	// contains filtered or unexported fields
}

func Load

func Load(r io.Reader) (*Document, error)

func NewFromMapSlice

func NewFromMapSlice(m *yaml.MapSlice) (*Document, error)

func (*Document) Append

func (d *Document) Append(path Path, newValue interface{}) bool

func (*Document) Equal added in v2.17.0

func (d *Document) Equal(other *Document) bool

Equal checks if d is semantically equivalent to other. This means memory equality is not checked, but rather the actual values.

func (*Document) Fill

func (d *Document) Fill(path Path, newValue interface{}) bool

Fill will set the value at the path to the newValue, but keeps any existing sub values intact.

func (*Document) Get

func (d *Document) Get(path Path) (interface{}, bool)

func (*Document) GetArray

func (d *Document) GetArray(path Path) ([]interface{}, bool)

func (*Document) GetBool

func (d *Document) GetBool(path Path) (bool, bool)

func (*Document) GetInt

func (d *Document) GetInt(path Path) (int, bool)

func (*Document) GetString

func (d *Document) GetString(path Path) (string, bool)

func (*Document) Has

func (d *Document) Has(path Path) bool

func (*Document) MarshalYAML

func (d *Document) MarshalYAML() (interface{}, error)

func (*Document) Remove

func (d *Document) Remove(path Path) bool

func (*Document) Set

func (d *Document) Set(path Path, newValue interface{}) bool

type Path

type Path []Step

func (Path) Parent

func (p Path) Parent() Path

func (Path) String

func (p Path) String() string

func (Path) Tail

func (p Path) Tail() Step

type Step

type Step interface{}

Jump to

Keyboard shortcuts

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