config_loader

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(config Configuration, options ...ConfigOption) error

Types

type ConfigOption added in v0.0.15

type ConfigOption func(*LoaderOpts)

func ConfigPath added in v0.0.15

func ConfigPath(path string) ConfigOption

ConfigPath sets the path to the config file.

func EnvPrefix added in v0.0.15

func EnvPrefix(prefix string) ConfigOption

EnvPrefix sets the prefix for environment variables. Will capitalize the prefix.

func ErrorIfNotFound added in v0.0.15

func ErrorIfNotFound(errorIfNotFound bool) ConfigOption

ErrorIfNotFound sets the flag that determines whether an error should be returned if the config file is not found.

type Configuration

type Configuration any

type LoaderOpts

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

LoaderOpts is a struct that contains options for the config loader.

Jump to

Keyboard shortcuts

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