envvar

package
v0.0.0-...-5905bd6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, dft string) string

GetEnv returns an environment variable's value or a default if empty.

func Load

func Load(filename string) error

Load reads the env filename and loads it into ENV for the current process. It also initializes/replaces app configuration.

Types

type Configuration

type Configuration struct{}

Configuration ...

func New

func New() *Configuration

New ...

func (*Configuration) Get

func (c *Configuration) Get(key string) (string, error)

Get returns the value from environment variable `<key>`. When an environment variable `<key>_SECURE` exists the provider is used for getting the value.

type Provider

type Provider interface {
	Get(key string) (string, error)
}

Provider ...

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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