The XCore package is used to build basic standart objects for programmation.
For GO, the actual existing code includes:
- XCache: Application Memory Caches, thread safe.
- XDataset: Basic nested data structures for any purpose (template injection, configuration files, database records, etc) Support thread safe operations on thread safe structures (XDatasetTS and XDatasetCollectionTS)
- XLanguage: language dependent text tables, thread safe
- XTemplate: template system with meta language, thread safe cloning
New into this release: big security update (thread/race safe, some minor bugs removed, full tests implemented):
- Minimum Go version is now 1.20
- Security audit and enhance race, locks and security problems
- xcache/Get funcion enhance to not race against rtime asignation of xcache entry
- xcache/mClean now quits the elements from the pile with calculated num, not last value of i (it's the same but more elegant), and remove only perc items
- xcache/Verify now use a snapshot to not lock many time the whole xache, and call the verify functions without locks
- xcache/Flush forgot to empty the pile too
- xcache/Set: Cleaning the cache after a Set if the are too much keys: only if more keys than the limit, not more or equal.
- removed LOG and debug entries for XCache (just losing time on tests)
- Generate new xcache_test with exhaustive tests of library including race
- xlanguage/LoadXMLString, ensure all variables access are into the lock, also Get/Set Name, Language
- xlanguage/Parse will not ignore anymore a wront language reading (Logged)
- xlanguage/XML generation will encode tags and attributes as they should be, always
- xlanguage/LoadString will lock the object only once, not for every value
- xlanguage/Load will accept only files < 10MB for memory security (big limit for text files you should not have problems)
- xlanguage/Load will check xml deep limits for security too
- xlanguage/io used instead of ioutil (deprecated)
- xlanguage/Load will defer file close
- xdataset: that path a>b>c now works even if the variables are not subsets (return nil)
- xdataset: convert values if possible
- xdataset: do not panic if collections are empty (Shift and Pop)
- xdataset: Clone now is really thread safe in case of recursivity
- xdataset/GetData race is fixed
- xdataset/String race is fixed (possible deadlock)
- All the code pass tests and race tests: go test -race -run -v .