func Unmarshal(data []byte, v interface{}) error {
	return UnmarshalWithOptions(data, v)
}
Unmarshal decodes the first document found within the in byte slice
and assigns decoded values into the out value.

Struct fields are only unmarshalled if they are exported (have an
upper case first letter), and are unmarshalled using the field name
lowercased as the default key. Custom keys may be defined via the
"yaml" name in the field tag: the content preceding the first comma
is used as the key, and the following comma-separated options are
used to tweak the marshalling process (see Marshal).
Conflicting names result in a runtime error.

For example:

type T struct {
F int `yaml:"a,omitempty"`
B int
}
var t T
yaml.Unmarshal([]byte("a: 1\nb: 2"), &t)

See the documentation of Marshal for the format of tags and a list of
supported tag options.
package yaml
import (
	"bytes"
	"context"
	"io"
	"github.com/goccy/go-yaml/ast"
	"github.com/goccy/go-yaml/internal/errors"
	"golang.org/x/xerrors"
)
type BytesMarshaler interface {
	MarshalYAML() ([]byte, error)
}
type BytesMarshalerContext interface {
	MarshalYAML(context.Context) ([]byte, error)
}
type InterfaceMarshaler interface {
	MarshalYAML() (interface{}, error)
}
type InterfaceMarshalerContext interface {
	MarshalYAML(context.Context) (interface{}, error)
}
type BytesUnmarshaler interface {
	UnmarshalYAML([]byte) error
}
type BytesUnmarshalerContext interface {
	UnmarshalYAML(context.Context, []byte) error
}
type InterfaceUnmarshaler interface {
	UnmarshalYAML(func(interface{}) error) error
}
type InterfaceUnmarshalerContext interface {
	UnmarshalYAML(context.Context, func(interface{}) error) error
}
type MapItem struct {
	Key, Value interface{}
}
type MapSlice []MapItem
func (s MapSlice) ToMap() map[interface{}]interface{} {
	v := map[interface{}]interface{}{}
	for _, item := range s {
		v[item.Key] = item.Value
	}
	return v
}
func Marshal(v interface{}) ([]byte, error) {
	return MarshalWithOptions(v)
}
func MarshalWithOptions(v interface{}, opts ...EncodeOption) ([]byte, error) {
	return MarshalContext(context.Background(), v, opts...)
}
func MarshalContext(ctx context.Context, v interface{}, opts ...EncodeOption) ([]byte, error) {
	var buf bytes.Buffer
	if err := NewEncoder(&buf, opts...).EncodeContext(ctx, v); err != nil {
		return nil, errors.Wrapf(err, "failed to marshal")
	}
	return buf.Bytes(), nil
}
func ValueToNode(v interface{}, opts ...EncodeOption) (ast.Node, error) {
	var buf bytes.Buffer
	node, err := NewEncoder(&buf, opts...).EncodeToNode(v)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to convert value to node")
	}
	return node, nil
}