Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the ability to specify a configuration file. By default, configuration files are not considered, they must be explicitly specified.
To specify a configuration file, set the FileHandler of an instance of Config to any valid object implementing the gofigure.File interface. Only configuration options whose FileSpec is specified are extracted from configuration files. A 'file spec' for a configuration option matches the regex (?P[^.]+.)*(?P). For example, a specification could be 'options.video.resolution', which would extract the 'resolution' key from the 'video' subcategory of category 'options'.
This pull request comes with an example implementation of file, JsonFile, which can be used to extract information of any type as a string from a JSON file. Each JSON object is a category, which can contain
any amount of categories (objects) or values (primitive types - string, number or boolean).
The JSON file functionality is tested.
By default, the configuration file takes precedence over the environment. This can be reversed by a flag on the Config object. Feel free to alter this, the tests do not depend on its default value.