env

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Development is developers local environment not necessarily connected to Internet.
	Development = Env(development)
	// Staging describes production like environment such as testing or CI server.
	Staging = Env(staging)
	// Production describes the one and only production environment.
	Production = Env(production)
)

Variables

View Source
var EnvDefault = Production

EnvDefault is the default runtime environment.

Functions

This section is empty.

Types

type Env

type Env string

Env represents runtime environment.

func MustParseEnv

func MustParseEnv(s string) Env

MustParseEnv calls ParseEnv and on error returns EnvDefault.

func ParseEnv

func ParseEnv(s string) (Env, error)

ParseEnv parses environment from string and on unknown environment fails with error.

func (Env) String

func (e Env) String() string

Jump to

Keyboard shortcuts

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