yaml

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package yaml provides yaml support by implementing the Parser interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YAML

type YAML struct {
	// contains filtered or unexported fields
}

YAML provides support for unmarshalling YAML into the applications config value. After the yaml is unmarshalled, the Parse function is executed to apply value to config struct fields.

func Reader

func Reader(r io.Reader) YAML

Reader accepts a reader to read the yaml.

func WithData

func WithData(data []byte) YAML

WithData accepts the yaml document as a slice of bytes.

func (YAML) Parse

func (y YAML) Parse(cfg interface{}) error

Parse performs the actual processing of the yaml. It unmarshal the yaml into the config struct.

Jump to

Keyboard shortcuts

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