Documentation ¶
Index ¶
- Constants
- func Development() bool
- func Env(name string) string
- func FromWebSafeBase64(str string) string
- func GOENV() string
- func Production() bool
- func SetEnv(name, value string) error
- func SubStr(str string, start int, length int) string
- func SubString(str string, start int, end int) string
- func Testing() bool
- func ToWebSafeBase64(str string) string
Constants ¶
View Source
const ( // DevelopmentEnv is the name of the environment variable used to mark the running mode of the application DevelopmentEnv = "GO_ENV" // WorkingPathEnv is the name of the environment variable used to mark the directory where the application runs WorkingPathEnv = "GO_WORKING_PATH" // DEV is a development pattern markup constant DEV = "development" // TESTING is a testing pattern markup constant TESTING = "testing" // PROD is a production pattern markup constant PROD = "production" )
Variables ¶
This section is empty.
Functions ¶
func Development ¶
func Development() bool
Development determines whether or not it is currently in development mode GO_ENV = development
func FromWebSafeBase64 ¶ added in v0.0.12
func Production ¶
func Production() bool
Production determines whether or not it is currently in production mode GO_ENV != testing && GO_ENV != development
func Testing ¶
func Testing() bool
Testing determines whether or not it is currently in testing mode GO_ENV = testing
func ToWebSafeBase64 ¶ added in v0.0.12
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package inflection pluralizes and singularizes English nouns.
|
Package inflection pluralizes and singularizes English nouns. |
Package now is a time toolkit for golang.
|
Package now is a time toolkit for golang. |
Package strftime is forked from https://github.com/lestrrat-go/strftime 仅保留针对字符串的 format
|
Package strftime is forked from https://github.com/lestrrat-go/strftime 仅保留针对字符串的 format |
Click to show internal directories.
Click to hide internal directories.