yaml

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct{}

func (Codec) Marshal

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

Marshal handles both single values and arrays. For arrays of maps/objects, it outputs multi-document YAML (with --- separators). For simple arrays or single values, it uses standard YAML marshaling.

func (Codec) Unmarshal

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

Unmarshal handles both single and multi-document YAML. For multi-document YAML (separated by ---), it returns an array of documents. For single-document YAML, it returns the document as-is.

Jump to

Keyboard shortcuts

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