config

package
v0.0.0-...-612eec2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// LogLevel is INFO or DEBUG. Default is "INFO".
	LogLevel string `envconfig:"LOG_LEVEL" default:"INFO"`

	// Env is environment where application is running The value must be
	// "development" or "production".
	Env string `envconfig:"ENV" required:"true"`

	// Port is http serve port.
	Port int `envconfig:"PORT" default:"8000"`
}

Env stores configuration settings extract from enviromental variables by using https://github.com/kelseyhightower/envconfig

func ReadFromEnv

func ReadFromEnv() (*Env, error)

ReadFromEnv reads configuration from environmental variables defined by Env struct.

Jump to

Keyboard shortcuts

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