config

package
v0.38.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Separator = "."

	// EnvSeparator is a section separator in ENV variables.
	EnvSeparator = "_"
)

Variables

This section is empty.

Functions

func CreateViper

func CreateViper(opts ...Option) (*viper.Viper, error)

func ReloadViper

func ReloadViper(opts ...Option) error

Types

type Option

type Option func(*opts)

Option allows to set an optional parameter of the Config.

func WithConfigDir

func WithConfigDir(path string) Option

WithConfigDir returns an option to set the system path to the directory with configuration files.

func WithConfigFile

func WithConfigFile(path string) Option

WithConfigFile returns an option to set the system path to the configuration file.

func WithEnvPrefix

func WithEnvPrefix(envPrefix string) Option

WithEnvPrefix returns an option to defines a prefix that ENVIRONMENT variables will use.

func WithViper

func WithViper(v *viper.Viper) Option

WithViper returns an option to defines a predefined viper.Viper.

Jump to

Keyboard shortcuts

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