Skip to content

v1.0.0

Compare
Choose a tag to compare
@aboxis aboxis released this 09 Jul 17:04
· 1 commit to main since this release

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.