yaml

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package yaml wraps gopkg.in/yaml.v3 and helps transition from v2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(in interface{}) ([]byte, error)

Marshal some struct as a YAML document.

func ParseYAML

func ParseYAML[T any](f io.Reader) (*T, error)

This is mainly used in tests, normal app operations should not need this

func ParseYAMLFile

func ParseYAMLFile[T any](file string) (*T, error)

This is mainly used in tests, normal app operations should not need this

func ParseYAMLString

func ParseYAMLString[T any](data string) (*T, error)

func Unmarshal

func Unmarshal(in []byte, out interface{}) error

Unmarshal some struct as a YAML document, without strict behavior.

func UnmarshalStrict

func UnmarshalStrict(in []byte, out interface{}) error

UnmarshalStrict unmarshals a YAML document with strict behavior (only declared fields are tolerated).

Types

This section is empty.

Jump to

Keyboard shortcuts

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