runenv

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Domain                 = "lava"
	CatchSigpipe           = false
	Block                  = true
	Trace                  = false
	Addr                   = ":8080"
	DebugAddr              = ":8081"
	Project                = "lava"
	Level                  = "debug"
	Mode                   = "dev"
	Signal       os.Signal = syscall.Signal(0)
)

默认的全局配置

View Source
var RunmodeValue = map[string]int32{
	"dev":     0,
	"test":    1,
	"stag":    2,
	"prod":    3,
	"release": 4,
	"unknown": 5,
}

Functions

func CheckMode

func CheckMode() bool

CheckMode 运行环境检查

func IsDev

func IsDev() bool

func IsProd

func IsProd() bool

func IsRelease

func IsRelease() bool

func IsStag

func IsStag() bool

func IsTest

func IsTest() bool

Types

type RunMode

type RunMode int32
const (
	RunmodeDev     RunMode = 0
	RunmodeTest    RunMode = 1
	RunmodeStag    RunMode = 2
	RunmodeProd    RunMode = 3
	RunmodeRelease RunMode = 4
	RunModeUnknown RunMode = 5
)

func (RunMode) String

func (x RunMode) String() string

Jump to

Keyboard shortcuts

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