gmode

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package gmode provides release mode management for project.

It uses string to mark the mode instead of integer, which is convenient for configuration.

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 checks and returns whether current application is running in DEVELOP mode.

func IsProduct

func IsProduct() bool

IsProduct checks and returns whether current application is running in PRODUCT mode.

func IsStaging

func IsStaging() bool

IsStaging checks and returns whether current application is running in STAGING mode.

func IsTesting

func IsTesting() bool

IsTesting checks and returns whether current application is running in TESTING mode.

func Mode

func Mode() string

Mode returns current application mode set.

func Set

func Set(mode string)

Set sets the mode for current application.

func SetDevelop

func SetDevelop()

SetDevelop sets current mode DEVELOP for current application.

func SetProduct

func SetProduct()

SetProduct sets current mode PRODUCT for current application.

func SetStaging

func SetStaging()

SetStaging sets current mode STAGING for current application.

func SetTesting

func SetTesting()

SetTesting sets current mode TESTING for current application.

Types

This section is empty.

Jump to

Keyboard shortcuts

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