config

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEnv

func FromEnv(config *Config) error

FromEnv reads the config from environment variables

func FromFile

func FromFile(path string, config *Config) error

FromFile reads the config from a file

Types

type Config

type Config struct {
	AppEnv      string `json:"app_env" envconfig:"APP_ENV" default:"development"`
	DatabaseURL string `json:"database_url" envconfig:"DATABASE_URL" required:"true"`
}

Config holds the configuration data

Jump to

Keyboard shortcuts

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