Categorygithub.com/crabi/cfg/v2
modulepackage
2.1.3
Repository: https://github.com/crabi/cfg.git
Documentation: pkg.go.dev

# README

cfg

About

Go package that defines a standard way to load configuration using viper.

Disclaimer

This library does not standarizes how the required variables are loaded. A clear example of loading variables via command line flags be found in example/main.go.

Requirements

  • Viper

Usage

Expected default config files:

  • config/default.yaml
  • config/local.yaml

Suggested additional config files:

  • config/develop.yaml
  • config/test.yaml
  • config/staging.yaml
  • config/production.yaml

For an example, see the directory example/.

# Packages

No description provided by the author

# Functions

Load loads a config directory, the default config file and overrides with a given configuration.

# Structs

Params is used to load a new environment.

# Interfaces

Config gives access to the loaded configuration.