Help us shape the future of Go! Take the 2026 Go Developer Survey

env

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 5 Imported by: 2

README

env

Load .env files for go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppPrefix = ""

Functions

func Get

func Get(key string) string

Get returns the value from the environment config

func GetBool

func GetBool(key string) bool

GetBool returns a boolean configuration setting

func GetInt

func GetInt(key string) int

GetInt returns the integer value from the environment config

func GetIntWithDefault

func GetIntWithDefault(key string, def int) int

GetIntWithDefault returns the integer value from the environment config or returns a default value if the setting is empty

func GetWithDefault

func GetWithDefault(key, def string) string

GetWithDefault returns the value from the environment config or returns a default value if the setting is empty

func Load

func Load(prefix, path string, opts ...Option) error

Load will load an ini formatted file into the os ENVIRONMENT

func Override

func Override(opts ...Option)

Override environment config with additional options

Types

type Option

type Option struct {
	Key   string
	Value string
}

Option allows you to provide addtional settings to override

Jump to

Keyboard shortcuts

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