Documentation
¶
Overview ¶
Package env provides a structure for setting and identifying the environment an application is running in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Environment ¶
type Environment string
Environment represents the application environment
const ( // PROD is the production environment PROD Environment = "PROD" // STAGE is the staging environment STAGE Environment = "STAGE" // DEV is the development environment DEV Environment = "DEV" )
func (Environment) IsDev ¶
func (e Environment) IsDev() bool
IsDev returns true if the Environment is DEV
func (Environment) IsProd ¶
func (e Environment) IsProd() bool
IsProd returns true if the Environment is PROD
func (Environment) IsStage ¶
func (e Environment) IsStage() bool
IsStage returns true if the Environment is STAGE
func (Environment) String ¶
func (e Environment) String() string
String returns a human-readable string representation of the Environment
Click to show internal directories.
Click to hide internal directories.