gonfig

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: MIT Imports: 6 Imported by: 0

README

Gonfig - configurator for golang application GoDoc GitHub tag

License FOSSA Status gonfig codecov Scrutinizer Code Quality Sourcegraph HitCount

GolangCI Go Report Card

License

FOSSA Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApplicationMode

func GetApplicationMode() *string

GetApplicationMode returns the flag to the application launch mode. Looks at the APP_MODE environment variable if the application is running without a flag -mode Default release

func GetEnv

func GetEnv(key string) []byte

GetEnv returns ENV variable from environment or .env file as []byte if it's possible and ENV variable exists Default 0

func GetEnvInt added in v1.0.1

func GetEnvInt(key string) int

GetEnvInt returns ENV variable from environment or .env file as int if it's possible and ENV variable exists Default 0

func GetEnvIntWithDefault added in v1.0.2

func GetEnvIntWithDefault(key string, defaultValue int) int

GetEnvIntWithDefault returns ENV variable from environment or .env file as int else returns default value

func GetEnvStr

func GetEnvStr(key string) string

GetEnvStr returns ENV variable from environment or .env file as string if it's possible and ENV variable exists Default ""

func GetEnvStrWithDefault added in v1.0.2

func GetEnvStrWithDefault(key string, defaultValue string) string

GetEnvStr returns ENV variable from environment or .env file as string else returns default value

func GetListenPort

func GetListenPort() *string

GetListenPort returns a flag to the port to launch the application. Looks at the PORT environment variable if the application is running without a flag. Default 80

Types

This section is empty.

Jump to

Keyboard shortcuts

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