Documentation
¶
Overview ¶
Package environment Created by guoxin in 2020/11/8 6:38 下午
Package environment Created by guoxin in 2020/4/10 11:18 上午
Index ¶
Constants ¶
View Source
const ( YAML = "yaml" APPLICATION = "application" ConfigDirectory = "conf" DefaultProfile = "dev" DefaultConfigFileName = APPLICATION + core.S + YAML )
Variables ¶
This section is empty.
Functions ¶
func GetProperty ¶
GetProperty Get the configuration in application.yaml under the current environment directory
Types ¶
type Application ¶
type Application struct { Name string `mapstructure:"name"` Profile string `mapstructure:"profile"` RequestId bool `mapstructure:"request_id"` }
Application The properties that Application has, If the future properties out more application-specific properties put in here
type ApplicationFile ¶
func GetApplicationFile ¶
func GetApplicationFile() *ApplicationFile
GetApplicationFile Get the configuration directory application.yaml viper.Viper
func (*ApplicationFile) Directory ¶
func (a *ApplicationFile) Directory() string
Directory Get the current configuration directory
type Configuration ¶
type Configuration struct { // Make sure you only initialize it once core.InitializeLock // contains filtered or unexported fields }
func (*Configuration) Initialize ¶
func (c *Configuration) Initialize(params ...interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.