bviper

package module
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: MIT Imports: 5 Imported by: 3

README

bviper

codecov

Viper brick to be used by Bricks

Documentation

Index

Constants

View Source
const (
	// EnvKeyDelimiterFrom shell environment delimiter
	EnvKeyDelimiterFrom = "_"
	// EnvKeyDelimiterTo delimiter used by application
	EnvKeyDelimiterTo = "."
)

Variables

This section is empty.

Functions

func Builder

func Builder() cfg.Builder

Builder creates a simple viper instance with a given config file path configFilePath should point to a file that have one of these extensions:

"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "dotenv", "env", "ini"

func CustomBuilder

func CustomBuilder(custom *viper.Viper) cfg.Builder

CustomBuilder allows one to use an already initialized and configure Viper instance

Note:

It's important to receive a viper instance that is already initialized using viper.ReadInConfig() or viper.ReadConfig(in io.Reader) or viper.ReadRemoteConfig()

Also note that all other Builder function will do nothing since we assume this instance is configured properly

Types

This section is empty.

Jump to

Keyboard shortcuts

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