yaml

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package yaml provides yaml support for conf.

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 unmarshaling YAML into the applications config value. After the yaml is unmarshaled, the Parse function is executed to apply defaults and overrides. Fields that are not set to their zero after the yaml is parsed will have the defaults ignored.

func WithData

func WithData(data []byte) YAML

WithData accepts the yaml document as a slice of bytes.

func WithReader

func WithReader(r io.Reader) YAML

WithReader accepts a reader to read the yaml.

func (YAML) Process

func (y YAML) Process(prefix string, cfg interface{}) error

Process performs the actual processing of the yaml.

Jump to

Keyboard shortcuts

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