yamlx

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(v any, filename string) error

Open reads the given object from the given filename using YAML encoding

func OpenFS

func OpenFS(v any, fsys fs.FS, filename string) error

OpenFS reads the given object from the given filename using YAML encoding, using the given fs.FS filesystem (e.g., for embed files)

func OpenFiles

func OpenFiles(v any, filenames ...string) error

OpenFiles reads the given object from the given filenames using YAML encoding

func OpenFilesFS

func OpenFilesFS(v any, fsys fs.FS, filenames ...string) error

OpenFilesFS reads the given object from the given filenames using YAML encoding, using the given fs.FS filesystem (e.g., for embed files)

func Read

func Read(v any, reader io.Reader) error

Read reads the given object from the given reader, using YAML encoding

func ReadBytes

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

ReadBytes reads the given object from the given bytes, using YAML encoding

func Save

func Save(v any, filename string) error

Save writes the given object to the given filename using YAML encoding

func Write

func Write(v any, writer io.Writer) error

Write writes the given object using YAML encoding

func WriteBytes

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

WriteBytes writes the given object, returning bytes of the encoding, using YAML encoding

Types

This section is empty.

Jump to

Keyboard shortcuts

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