Documentation
¶
Index ¶
- Variables
- func GetEnv() string
- type Environment
- func (e Environment) Get(setting string) (result string)
- func (e Environment) GetBool(setting string) bool
- func (e Environment) GetFloat(setting string) float64
- func (e Environment) GetInt(setting string) int64
- func (e Environment) GetSlice(setting string) (result []string)
- func (e Environment) GetUint(setting string) uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var Env = flag.String("env", "local", "Please run app with environment -> ./app -env environment")
Functions ¶
Types ¶
type Environment ¶
type Environment struct {
Name *string
}
var Global Environment
Global settings from config/global.yaml
var Local Environment
Local settings from config/{environment}.yaml
func (Environment) Get ¶
func (e Environment) Get(setting string) (result string)
Get setting as string
func (Environment) GetBool ¶
func (e Environment) GetBool(setting string) bool
GetBool get setting as boolean
func (Environment) GetFloat ¶
func (e Environment) GetFloat(setting string) float64
GetFloat get setting as float64
func (Environment) GetInt ¶
func (e Environment) GetInt(setting string) int64
GetInt get setting as int64
func (Environment) GetSlice ¶
func (e Environment) GetSlice(setting string) (result []string)
GetSlice get setting as slice of strings
func (Environment) GetUint ¶
func (e Environment) GetUint(setting string) uint64
GetUint get setting as uint64
Click to show internal directories.
Click to hide internal directories.