env

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Mode = "_wzo_"

Variables

This section is empty.

Functions

func Is

func Is(target Env) bool

Is mode equal target.

func IsDev

func IsDev() bool

IsDev is dev or not.

func IsProd

func IsProd() bool

IsProd is prod or not.

func IsRelease

func IsRelease() bool

IsRelease uat or prod

func IsTest

func IsTest() bool

IsTest is test or not.

func IsTesting

func IsTesting() bool

IsTesting dev or test

func IsUat

func IsUat() bool

IsUat is uat or not.

func Set

func Set(s string)

func SetDev

func SetDev()

SetDev set dev.

func SetProd

func SetProd()

SetProd set prod.

func SetTest

func SetTest()

SetTest set test.

func SetUat

func SetUat()

SetUat set uat.

func Valid

func Valid() bool

Valid return true if one of dev, test, uat or prod.

Types

type Env

type Env int8
const (
	None Env = iota // none
	Dev             // dev
	Test            // test
	Uat             // uat
	Prod            // prod
)

func Get

func Get() Env

func (Env) String

func (i Env) String() string

Jump to

Keyboard shortcuts

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