Documentation ¶
Index ¶
- func Get(key string) string
- func GetEnv() string
- func GetScope() string
- func IsEmptyString(value string) bool
- func IsLocal() bool
- func IsRemote() bool
- func Load() error
- func Reset()
- func SetConfig(cfg *Config)
- func SetConfigFile(configFile string)
- func SetConfigPath(configPath string)
- func SetLogger(logger *slog.Logger)
- type Config
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnv ¶
func GetEnv() string
GetEnv Get env variable from the System. Example for test.golang-template.internal.com is test.
func GetScope ¶
func GetScope() string
GetScope Get scope name from the System. Priority order is as follows:
-1. It looks in "app.scope" system property. -2. If empty, it looks in ENV system env variable -2.1. If empty, it is a local scope -2.2. If not empty and starts with "test," it is a test scope -2.3. Otherwise, it is a "prod" environment.
func IsEmptyString ¶
func SetConfigPath ¶
func SetConfigPath(configPath string)
SetConfigPath "config" from root by default.
Types ¶
Click to show internal directories.
Click to hide internal directories.