confiqtoml

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 confiqtoml allows confiq values to be loaded from TOML format.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotOpenTOMLFile  = errors.New("cannot open TOML file")
	ErrCannotReadTOMLData  = errors.New("cannot read TOML data")
	ErrCannotReadTOMLBytes = errors.New("cannot read TOML 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 TOML 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 TOML file from the given bytes.

func (*Container) FromFile

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

FromFile loads a TOML file from the given path.

func (*Container) FromReader

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

FromReader loads a TOML file from a reader stream.

func (*Container) FromString

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

FromString loads a TOML file from the given string.

func (*Container) Get

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

Get returns the loaded TOML values.

Jump to

Keyboard shortcuts

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