conf

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package conf provide functions for loading config from yaml file or env variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadENV

func LoadENV(prefix string, config interface{}) error

LoadENV fills config variable from envs based on supplied prefix NOTE: Slices in ENVs need value separation by comma: val1,val2,..

func LoadYAML

func LoadYAML(file string, config interface{}) error

LoadYAML fills config variable with data from config yaml file

func ReadFlagsHelper

func ReadFlagsHelper() (confFile, envPrefix string)

ReadFlagsHelper forces user to specify either yaml conf path or env prefix through flags and returns them

Types

This section is empty.

Jump to

Keyboard shortcuts

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