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