yaml

package
v0.164.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v any) ([]byte, error)

func NewDecoder

func NewDecoder(data []byte, strict bool) func(any) error

NewDecoder creates and returns a function that is used to decode a YAML document contained within the YAML document stream per each call. When strict is true, this function ensures that every field found in the YAML document to have the corresponding field in the decoded Go struct.

func Unmarshal

func Unmarshal(data []byte, v any) error

Types

type Encoder

type Encoder interface {
	Encode(any) error
	Close() error
}

func NewEncoder

func NewEncoder(w io.Writer) Encoder

NewEncoder creates and returns a function that is used to encode a Go object to a YAML document

Jump to

Keyboard shortcuts

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