@UTF-8
Package xconfig loads a configuration file similar to a .ini file, but with some important improvements:
- The xconfig recognize bool, int, float and Strings, and also collections of values and hierarchical nested sub-config sets.
- The xconfig is compatible with XDataset to inject and use in templates, database records, etc.
- You can load more than one file in merge mode or replacing mode in the same config object.
- You can set and get parameters at any time.
- You can load the config object based on a file, but also on a string and another object; this way you can serialize, unserialize, transfer by any strem, save or load on database the object, etc.
- You can also save back the config string with all its comments.
Manuals are available on godoc.org
- Make it thread safe ? (so maybe with a flag to activate it ?)
- Add Time ? Other types of int32, int64, float32, runes etc ?
- Merge vs load to load more than 1 file (pending)
- implement + and :
- Add a flag when it's a multiple load to warn a "save"
- Add error control con Get* for type conversions (if the type is different as expected)
- Log errors into official log
- Documentation revised and added with Marshal and SaveFile Functions
- Bug corrected in Marshal, sometimes an empty line was ignored by the reconstruction of the string
- Pointers to self structure changed (c.Parameters instead of (*c).Parameters)
- Del/Set/Add function now work correctly and do not duplicate entries if not merged (Add)
- Marshal and SaveFile implemented to generate original string of XConfig file and save it to a file.
- example directory removed. The examples are implicitly into documentation and tests.
- Modulatization (go mod init) and use of xcore/v2
- Documentation finished
- Comments into code, corrections to meet golint standards
- String modified to order printed lines and get a uniform result if the XConfig contains the same data
- Tests implemented to verify official defined specs
- Documentation enhanced, Configuration Syntax Reference added
- Licence and Tests Added
- Documentation enhanced
- Bug corrected on String and GoString()
- Modification to XConfig to meet xcore v1.0.0 (.String and .GoString functions added, .Stringify function removed)
- Code formated before sending to github (gofmt -s)
- Incode println removed
- Added Clone functions to meet xcore.XDatasetDef definition
- Added functions of Time to get time data.
- Added conversion between types con Get* functions
- XConfig object aligned with XDataset with missing set of functions
- XConfig csn now be injected into an XTemplate
- Added GetString, GetInt, GetBool and GetFloat to directly get the known value type (and do not have to convert types)
- Error corrected on Set (type float added)
Branch "late-night" added to github
- Added support for sub-XConfig with entry1.entry2.entry3=xxx
- Added support for strings starting with "
- Added support for array of booleans
- Added support for float parameters
- Work for a full normal load of a file, suporting also repeated parameters (array of parameters)
- VERSION constant added
- XConfig.Get function implemented for basic parameters (without + or :)
- First commit, only work to load basic parameters