cfg

package
v0.0.0-...-48dec25 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 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 {
	Host        string `default:"0.0.0.0"`
	Port        int    `default:"8080"`
	APIPort     int    `envconfig:"API_PORT" default:"8475"`
	UpstreamURL string `envconfig:"UPSTREAM_URL" default:"http://localhost"`
}

Env represents the possible environment variable config params.

func New

func New() Env

New returns a new configuration, populated from environment variables and/or defaults. NB: It will panic if defaults aren't set.

Jump to

Keyboard shortcuts

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