Categorygithub.com/gopher-lib/config
modulepackage
0.3.0
Repository: https://github.com/gopher-lib/config.git
Documentation: pkg.go.dev

# README

config Eloquent configuration for Golang apps.

Go Reference

Features:

  • Substitutes $VARIABLE and ${VARIABLE} with variables found in a shell environment.
  • Syntaxes for setting up default values and specifying mandatory variables:
    • ${VARIABLE:-default} evaluates to default if VARIABLE is unset or empty in the environment.
    • ${VARIABLE-default} evaluates to default only if VARIABLE is unset in the environment.
    • ${VARIABLE:?err} panics with an error message containing err if VARIABLE is unset or empty in the environment.
    • ${VARIABLE?err} panics with an error message containing err if VARIABLE is unset in the environment.

Examples:

# Functions

Load reads configuration data encoded in the format specified by configType from in and unmarshals it into v.
LoadFile reads configuration data from the named file and unmarshals it into v.

# Constants

Supported configuration file formats.
Supported configuration file formats.
Supported configuration file formats.

# Variables

No description provided by the author