环境类

package
v0.0.0-...-2910145 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package gmode 为项目提供发布模式管理功能。

它使用字符串而非整数来标记模式,这种方式对于配置更为方便。

Index

Constants

View Source
const (
	NOT_SET = "not-set"
	DEVELOP = "develop"
	TESTING = "testing"
	STAGING = "staging"
	PRODUCT = "product"
)

Variables

This section is empty.

Functions

func IsDevelop

func IsDevelop() bool

IsDevelop 检查并返回当前应用程序是否在开发模式下运行。

func IsProduct

func IsProduct() bool

IsProduct 检查并返回当前应用程序是否在PRODUCT模式下运行。

func IsStaging

func IsStaging() bool

IsStaging 检查并返回当前应用程序是否在 STAGING(暂存)模式下运行。

func IsTesting

func IsTesting() bool

IsTesting 检查并返回当前应用程序是否处于测试模式运行。

func Mode

func Mode() string

Mode 返回当前设置的应用程序模式。

func SetDevelop

func SetDevelop()

SetDevelop 将当前应用程序的当前模式设置为 DEVELOP 模式。

func SetProduct

func SetProduct()

SetProduct 将当前应用的模式设置为PRODUCT模式。

func SetStaging

func SetStaging()

SetStaging 将当前应用的当前模式设置为 STAGING。

func SetTesting

func SetTesting()

SetTesting 设置当前应用程序的当前模式为 TESTING。

func X设置值

func X设置值(mode string)

Set 设置当前应用程序的模式。

Types

This section is empty.

Jump to

Keyboard shortcuts

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