dotenv

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of this Provider
	Name = "dotenv"

	// FilesEnvVar is the environment variable which lists the files to load
	FilesEnvVar = "DOTENV_FILES"
)

Variables

This section is empty.

Functions

func New

func New() (environ.Provider, error)

New returns a new Parser as an environ.Provider or an error if configuring failed if no files are listed, will search in CWD for any .env files.

Types

type Parser

type Parser struct {
	Files []string `env:"DOTENV_FILES" envSeparator:":"`
}

Parser is an github.com/lumoslabs/vestibule/pkg/environ.Provider which accepts a list of dotenv files and, using github.com/joho/godotenv, parses them and adds the result to an environ.Environ object

func (*Parser) AddToEnviron

func (p *Parser) AddToEnviron(e *environ.Environ) error

AddToEnviron uses godotenv to read all specified dotenv files and add them to the environ.Environ without overwriting

Jump to

Keyboard shortcuts

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