yaml

package
v0.0.0-...-dab1723 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CTXT_STATE_NONE     decodeState = iota
	CTXT_STATE_SCALAR   decodeState = iota
	CTXT_STATE_MAPPING  decodeState = iota
	CTXT_STATE_SEQUENCE decodeState = iota
	CTXT_STATE_DONE     decodeState = iota
)

Variables

This section is empty.

Functions

func DecodeStream

func DecodeStream(b []byte, values map[string]interface{}) error

func EscapeString

func EscapeString(s string) string

func KvToYaml

func KvToYaml(key string, val interface{}, indent int) string

Converts a key-value pair to a YAML string.

func MapToYaml

func MapToYaml(m map[string]interface{}) string

func SetFilename

func SetFilename(filename string)

func Unmarshal

func Unmarshal(src []byte, dst interface{}) error

This function just wraps DecodeStream with the name "Unmarshal." This allows this library to be used in place of other YAML decoding libraries.

Types

type YamlDispatchFn

type YamlDispatchFn func(*yaml_parser_t, *yaml_event_t,
	*decodeCtxt) (decodeCtxt, error)

Jump to

Keyboard shortcuts

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