yaml

package module
v0.0.0-...-70aca8a Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

yaml provides a way to encode both the simple form and the detailed form of configuration data for the goschtalt library.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEncoding = errors.New("encoding error")
)

Functions

This section is empty.

Types

type Encoder

type Encoder struct{}

Encoder is a class for the yaml encoder.

func (Encoder) Encode

func (e Encoder) Encode(a any) ([]byte, error)

Encode encodes the value provided into yaml and returns the bytes.

func (Encoder) EncodeExtended

func (e Encoder) EncodeExtended(obj meta.Object) ([]byte, error)

Encode encodes the meta.Object provided into yaml with comments showing the origin of the configuration and returns the bytes.

func (Encoder) Extensions

func (e Encoder) Extensions() []string

Extensions returns the supported extensions.

Jump to

Keyboard shortcuts

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