Releases: oxisoft/config
Releases · oxisoft/config
v1.0.1
New Features
Environment Variable Support:
- Enhanced the NewConfig function to support paths containing environment variables like $HOME. The function now automatically expands these variables to their respective values, allowing for more flexible and user-friendly configuration file locations.
Bug Fixes
Improved Error Messages:
- Enhanced error messages for better clarity and user-friendliness when loading and parsing configuration files.
v1.0.0
New Features
- Initial Release: This is the first release of the config library, providing robust functionality for managing configuration files in Go.
Features
Configuration Loading:
- Load JSON configuration files from multiple specified paths.
- Automatically search for the configuration file in the provided paths and load it into memory.
Value Retrieval:
- Retrieve configuration values as string, int64, or bool.
Methods provided with and without error handling:
- GetString(key string) string
- GetStringWithError(key string) (string, error)
- GetInt(key string) int64
- GetIntWithError(key string) (int64, error)
- GetBool(key string) bool
- GetBoolWithError(key string) (bool, error)
Key Validation:
- Check the existence and validity of required keys in the configuration file using CheckKeys(keys []string) error.
- Ensures keys are present and, if they are strings, that they are not empty.