Documentation ¶
Index ¶
- Constants
- func GetConfDir() string
- func GetEnv() string
- func MustGetExecutableConfDir() string
- func MustGetWorkDir() string
- func NewConfig() (gone.Vampire, gone.GonerId, gone.GonerOption)
- func NewConfigure() (gone.Goner, gone.GonerId, gone.GonerOption, gone.GonerOption)
- func ParseConfAnnotation(tag string) (key string, defaultVal string)
- func Priest(cemetery gone.Cemetery) error
- type ConfSetting
- type Configure
Constants ¶
View Source
const ConPath = "config"
View Source
const DefaultConf = "default"
View Source
const EConf = "CONF"
View Source
const EEnv = "ENV"
View Source
const SliceMaxSize = 100
View Source
const TestSuffix = "_test"
Variables ¶
This section is empty.
Functions ¶
func GetConfDir ¶ added in v1.0.0
func GetConfDir() string
GetConfDir get config directory, fetch value from command line flag(-conf) first, then from environment variable(CONF)
func GetEnv ¶
func GetEnv() string
GetEnv get environment, fetch value from command line flag(-env) first, then from environment variable(ENV), then use default value
func MustGetExecutableConfDir ¶ added in v1.0.0
func MustGetExecutableConfDir() string
func MustGetWorkDir ¶ added in v1.0.0
func MustGetWorkDir() string
func NewConfigure ¶
func NewConfigure() (gone.Goner, gone.GonerId, gone.GonerOption, gone.GonerOption)
func ParseConfAnnotation ¶ added in v0.0.22
Types ¶
type ConfSetting ¶ added in v1.0.0
ConfSetting config settings, include config file dir path and config file name(do not include file extension)
func GetConfSettings ¶ added in v1.0.0
func GetConfSettings(isInTestKit bool) (configs []ConfSetting)
GetConfSettings get config settings
Click to show internal directories.
Click to hide internal directories.