runenv

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRunEnv

func GetRunEnv() (e string)

GetRunEnv the current runtime environment

func GetRunEnvKey

func GetRunEnvKey() string

GetRunEnvKey the key of the runtime environment

func Is

func Is(env REnv) bool

Is reports whether the server is running in its env configuration

func IsDev

func IsDev() bool

IsDev reports whether the server is running in its development configuration

func IsGray

func IsGray() bool

IsGray reports whether the server is running in its gray configuration

func IsProduct

func IsProduct() bool

IsProd reports whether the server is running in its production configuration

func IsTest

func IsTest() bool

IsTest reports whether the server is running in its testing configuration

func Not

func Not(env REnv) bool

func SetRunEnvKey

func SetRunEnvKey(key string) error

SetRunEnvKey set run environment key

Types

type REnv

type REnv string

REnv custom type

const (
	DefaultREnv      = Develop
	Develop     REnv = "develop"
	Test        REnv = "test"
	Gray        REnv = "gray"
	Product     REnv = "product"
)

func (REnv) ToLower

func (r REnv) ToLower() string

ToLower strings.ToLower

Jump to

Keyboard shortcuts

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