yaml

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewEncoder = yaml.NewEncoder
	NewDecoder = yaml.NewDecoder
)

NewEncoder 和 NewDecoder 是 go.yaml.in/yaml/v3 对应函数的别名,用于面向 io.Writer 和 io.Reader 的流式多文档编解码;Encoder 使用后必须调用 Close,否则剩余数据不会写入 Writer。

Functions

func Marshal

func Marshal[T codec.Data](in any) (T, error)

func MustMarshal

func MustMarshal[T codec.Data](in any) T

func MustUnmarshal

func MustUnmarshal[V any, T codec.Data](in T) (v V)

func Unmarshal

func Unmarshal[T codec.Data](in T, out any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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