Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExtensionJson = ".json" ExtensionYaml = ".yaml" ExtensionInI = ".ini" NameSpace = "conf" )
View Source
const ( EnvTesting = Environment("testing") EnvProduction = Environment("production") )
use export ENVIRONMENT=testing set global environment
Variables ¶
This section is empty.
Functions ¶
func GetConfigModels ¶
Types ¶
type Environment ¶
type Environment string
func NewGlobalEnvironment ¶
func NewGlobalEnvironment() (Environment, error)
NewGlobalEnvironment 读取系统全局配置的环境变量
func (Environment) Invalid ¶
func (env Environment) Invalid() bool
func (*Environment) Production ¶
func (env *Environment) Production() Environment
func (*Environment) String ¶
func (env *Environment) String() string
func (*Environment) Testing ¶
func (env *Environment) Testing() Environment
Click to show internal directories.
Click to hide internal directories.