package
Version:
v0.0.0-...-2910145
Opens a new window with list of versions in this module.
Published: Feb 14, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package gmode 为项目提供发布模式管理功能。
它使用字符串而非整数来标记模式,这种方式对于配置更为方便。
View Source
const (
NOT_SET = "not-set"
DEVELOP = "develop"
TESTING = "testing"
STAGING = "staging"
PRODUCT = "product"
)
IsDevelop 检查并返回当前应用程序是否在开发模式下运行。
IsProduct 检查并返回当前应用程序是否在PRODUCT模式下运行。
IsStaging 检查并返回当前应用程序是否在 STAGING(暂存)模式下运行。
IsTesting 检查并返回当前应用程序是否处于测试模式运行。
SetDevelop 将当前应用程序的当前模式设置为 DEVELOP 模式。
SetProduct 将当前应用的模式设置为PRODUCT模式。
SetStaging 将当前应用的当前模式设置为 STAGING。
SetTesting 设置当前应用程序的当前模式为 TESTING。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.