yamlx

package
v2.1.872 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(value string) yaml.Node

func ToYamlString

func ToYamlString(data interface{}) (string, error)

Types

type Pair

type Pair struct {
	Key   interface{}
	Value interface{}
}

type YamlArray

type YamlArray struct {
	Node yaml.Node
}

func Array

func Array(items ...interface{}) *YamlArray

func (*YamlArray) Add

func (self *YamlArray) Add(values ...interface{}) error

func (*YamlArray) AddWithComment added in v2.1.850

func (self *YamlArray) AddWithComment(value interface{}, comment *string) error

func (*YamlArray) Length

func (self *YamlArray) Length() int

func (*YamlArray) MarshalYAML

func (self *YamlArray) MarshalYAML() (interface{}, error)

type YamlMap

type YamlMap struct {
	Node yaml.Node
}

func Map

func Map(pairs ...Pair) *YamlMap

func (*YamlMap) Add

func (yamlMap *YamlMap) Add(key interface{}, value interface{}) error

func (*YamlMap) AddAll

func (yamlMap *YamlMap) AddAll(pairs ...Pair) error

func (*YamlMap) AddOmitNil

func (yamlMap *YamlMap) AddOmitNil(key interface{}, value interface{}) error

func (*YamlMap) AddRaw added in v2.1.850

func (yamlMap *YamlMap) AddRaw(key interface{}, value string) error

func (*YamlMap) AddWithComment

func (yamlMap *YamlMap) AddWithComment(key interface{}, value interface{}, comment *string) error

func (*YamlMap) MarshalYAML

func (self *YamlMap) MarshalYAML() (interface{}, error)

func (*YamlMap) Merge

func (yamlMap *YamlMap) Merge(value interface{}) error

Jump to

Keyboard shortcuts

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