update app.go
This commit is contained in:
parent
e0d263e7ec
commit
08a5e7fec6
@ -161,8 +161,8 @@ func New(config ...Config) *App {
|
||||
if cfg.EnvDirectory == "" {
|
||||
cfg.EnvDirectory = ".env"
|
||||
}
|
||||
if cfg.EnvMode == "" {
|
||||
cfg.EnvMode = "development"
|
||||
if cfg.EnvMode == EnvironmentTesting {
|
||||
cfg.EnvDirectory = "./../../.env"
|
||||
}
|
||||
if cfg.LogLevel == "" {
|
||||
cfg.LogLevel = "debug"
|
||||
@ -323,6 +323,10 @@ func (a *App) Version() string {
|
||||
return a.config.Version
|
||||
}
|
||||
|
||||
func (a *App) EnvDirectory() string {
|
||||
return a.config.EnvDirectory
|
||||
}
|
||||
|
||||
func (a *App) EnvMode() Environment {
|
||||
return a.config.EnvMode
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user