Documentation
¶
Index ¶
- func GetIntKey(key string) int
- func GetIntKeyWithDefault(key string, defaultValue int) int
- func GetKey(key string) string
- func GetKeyWithDefault(key, defaultValue string) string
- func Load() error
- func LoadFromPath(path string) error
- func MustGetIntKey(key string) int
- func MustGetKey(key string) string
- func SetConfig(c Configer)
- type Configer
- type DotenvConfig
- func (c *DotenvConfig) GetIntKey(key string) int
- func (c *DotenvConfig) GetIntKeyWithDefault(key string, defaultValue int) int
- func (c *DotenvConfig) GetKey(key string) string
- func (c *DotenvConfig) GetKeyWithDefault(key, defaultValue string) string
- func (c *DotenvConfig) Load() error
- func (c *DotenvConfig) LoadFromPath(path string) error
- func (c *DotenvConfig) MustGetIntKey(key string) int
- func (c *DotenvConfig) MustGetKey(key string) string
- type MapConfig
- func (c *MapConfig) GetIntKey(key string) int
- func (c *MapConfig) GetIntKeyWithDefault(key string, defaultValue int) int
- func (c *MapConfig) GetKey(key string) string
- func (c *MapConfig) GetKeyWithDefault(key, defaultValue string) string
- func (c *MapConfig) Load() error
- func (c *MapConfig) LoadFromPath(_ string) error
- func (c *MapConfig) MustGetIntKey(key string) int
- func (c *MapConfig) MustGetKey(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIntKeyWithDefault ¶
func GetKeyWithDefault ¶
func LoadFromPath ¶
func MustGetIntKey ¶
func MustGetKey ¶
Types ¶
type Configer ¶
type DotenvConfig ¶
type DotenvConfig struct {
DotenvPath string
}
func MustLoadFromMCDotenv ¶
func MustLoadFromMCDotenv() *DotenvConfig
func NewDotenvConfig ¶
func NewDotenvConfig(path string) *DotenvConfig
func (*DotenvConfig) GetIntKey ¶
func (c *DotenvConfig) GetIntKey(key string) int
func (*DotenvConfig) GetIntKeyWithDefault ¶
func (c *DotenvConfig) GetIntKeyWithDefault(key string, defaultValue int) int
func (*DotenvConfig) GetKey ¶
func (c *DotenvConfig) GetKey(key string) string
func (*DotenvConfig) GetKeyWithDefault ¶
func (c *DotenvConfig) GetKeyWithDefault(key, defaultValue string) string
func (*DotenvConfig) Load ¶
func (c *DotenvConfig) Load() error
func (*DotenvConfig) LoadFromPath ¶
func (c *DotenvConfig) LoadFromPath(path string) error
func (*DotenvConfig) MustGetIntKey ¶
func (c *DotenvConfig) MustGetIntKey(key string) int
func (*DotenvConfig) MustGetKey ¶
func (c *DotenvConfig) MustGetKey(key string) string
type MapConfig ¶
type MapConfig struct {
// contains filtered or unexported fields
}
func NewMapConfig ¶
func (*MapConfig) GetIntKeyWithDefault ¶
func (*MapConfig) GetKeyWithDefault ¶
func (*MapConfig) LoadFromPath ¶
func (*MapConfig) MustGetIntKey ¶
func (*MapConfig) MustGetKey ¶
Click to show internal directories.
Click to hide internal directories.