update app.go
This commit is contained in:
+6
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user