appenv

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package appenv provides utilities to configure the app environment (prod, dev, test).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Env

func Env() string

Env returns the deployment environment set for this app ("prod", "dev", or "test"). Default to "dev".

func IsEnvDev

func IsEnvDev() bool

IsEnvDev return whether the app is in "dev" environment.

func IsEnvProd

func IsEnvProd() bool

IsEnvProd return whether the app is in "prod" environment.

func IsEnvTest

func IsEnvTest() bool

IsEnvTest return whether the app is in "test" environment.

func SetDefaultEnv

func SetDefaultEnv(newVal string)

SetDefaultEnv sets the deployment environment to the given value if not set.

func SetDefaultEnvToTest

func SetDefaultEnvToTest()

SetDefaultEnvToTest set the deployment environment to the "test" if not set.

func SetEnv

func SetEnv(newVal string)

SetEnv sets the deployment environment to the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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