confiqyaml

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package confiqyaml allows confiq values to be loaded from YAML format.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotOpenYAMLFile  = errors.New("cannot open YAML file")
	ErrCannotReadYAMLData  = errors.New("cannot read YAML data")
	ErrCannotReadYAMLBytes = errors.New("cannot read YAML bytes")
)

Functions

This section is empty.

Types

type Container

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

Container is a struct that holds the loaded values.

func Load

func Load() *Container

Load creates an empty container, into which the YAML values can be loaded.

func (*Container) Errors

func (c *Container) Errors() []error

Errors returns the errors that occurred during the loading process.

func (*Container) FromBytes

func (c *Container) FromBytes(input []byte) *Container

FromBytes loads a YAML file from the given bytes.

func (*Container) FromFile

func (c *Container) FromFile(path string) *Container

FromFile loads a YAML file from the given path.

func (*Container) FromReader

func (c *Container) FromReader(reader io.Reader) *Container

FromReader loads a YAML file from a reader stream.

func (*Container) FromString

func (c *Container) FromString(input string) *Container

FromString loads a YAML file from the given string.

func (*Container) Get

func (c *Container) Get() []any

Get returns the loaded YAML values.

Jump to

Keyboard shortcuts

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