init project
This commit is contained in:
18
providers/config/section_app.go
Normal file
18
providers/config/section_app.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package config
|
||||
|
||||
import "app/utils"
|
||||
|
||||
type App struct {
|
||||
Mode string
|
||||
}
|
||||
|
||||
func (a App) IsDebug() bool {
|
||||
return a.Mode == "debug"
|
||||
}
|
||||
|
||||
func (a App) IsRelease() bool {
|
||||
return a.Mode == "release"
|
||||
}
|
||||
func (a App) IsTesting() bool {
|
||||
return a.Mode == "testing" || utils.IsInTesting()
|
||||
}
|
||||
Reference in New Issue
Block a user