simpleconf

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 5 Imported by: 0

README

simpleconf

fast and simple, go lib to declare configurations from toml

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfiguration     = errors.New("invalid configuration")
	FuncErrMissingConfiguration = func(name string) error {
		return fmt.Errorf("missing conf key configuration: %s", name)
	}
)

Functions

func OneSubset

func OneSubset[T ConfValidator](conf T) auxReader

func ReadConfiguration

func ReadConfiguration(f ...auxReader) error

func SetEnvPrefix added in v0.2.0

func SetEnvPrefix(s string)

Types

type ConfValidator

type ConfValidator interface {
	Valid() bool
	Enabled() bool
	FailWhenMissing() bool
	// contains filtered or unexported methods
}

type EnableConf

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

func (EnableConf) Enabled

func (e EnableConf) Enabled() bool

func (EnableConf) FailWhenMissing added in v0.3.0

func (e EnableConf) FailWhenMissing() bool

Jump to

Keyboard shortcuts

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