configur

package
v0.0.0-...-200adea Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigSet

type ConfigSet struct {
	*koanf.Koanf
}

func GetConfigSet

func GetConfigSet() *ConfigSet

func ParseConfig

func ParseConfig(prefix string) *ConfigSet

Parse configuration Do it in this order

  1. Read config files a. /etc/ <key>.yaml <key>.json <key>.ini <key> b. homedir/<key> config.yaml config.json config.ini config c. homedir .<key>.yaml .<key>.json .<key>.ini .<key> d. Current working directory .<key>.yaml .<key>.json .<key>.ini .<key>
  2. Read environment variables parse environment variables in the form KEY_one_two as one.two
  3. Read command lines ???

func (*ConfigSet) BindValues

func (c *ConfigSet) BindValues(aFlagset *pflag.FlagSet)

type ParsePair

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

Jump to

Keyboard shortcuts

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