deploy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMustDeploy

func CheckMustDeploy()

CheckMustDeploy 校验当前的布署环境必须设置非 unknown 模式, 否则panic

func GetDeploy

func GetDeploy() string

GetDeploy 获取当前的布署模式

func IsDev

func IsDev() bool

IsDev 是否开发模式

func IsProduction

func IsProduction() bool

IsProduction 是否生产模式

func IsRelease

func IsRelease() bool

IsRelease 发布, 预发或者生产环境

func IsTest

func IsTest() bool

IsTest 是否测试模式

func IsTesting

func IsTesting() bool

IsTesting 测试, 开发或者调试

func IsUat

func IsUat() bool

IsUat 是否预发布模式

func MustSetDeploy

func MustSetDeploy(m string)

MustSetDeploy 设置布署模式, 不得为 None 模式, 否则panic

func Set

func Set(m Deploy)

Set 设置布署模式

Types

type Deploy

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

func Convert

func Convert(m string) Deploy

Convert m to Deploy

func Get

func Get() Deploy

Get 获取当前的布署模式

func (Deploy) String

func (i Deploy) String() string

Jump to

Keyboard shortcuts

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