支持GoFrame
来源:GoFrame
浏览 8
扫码
分享
2024-12-09 22:00:15
New Features
- Added the gdes package for handling DES encryption/decryption algorithms;
- Added the gkafka package, a Golang client for Kafka;
- Added the gpool object reuse pool, which is more flexible and powerful than the standard library’s sync.Pool, allowing customization of object caching time, creation methods, and destruction methods (http://gf.johng.cn/686654));
- Completed the refactoring of gtcp/gudp network communication packages with substantial improvements and added detailed documentation and example code (http://gf.johng.cn/494382));
- Added the gring concurrency-safe ring, a concurrency-safe version of the standard library container/ring package, with ease-of-use encapsulation (http://gf.johng.cn/686655));
- The gtime package now supports custom date formatting, with formatting syntax similar to PHP’s date syntax (http://gf.johng.cn/494387));
- Added a debug mode feature to gdb, implemented via the SetDebug method, which allows detailed SQL execution records in debug mode, with detailed documentation and example code (http://gf.johng.cn/702801));
- Added a query caching feature to gdb, implemented via the Cache method, with detailed documentation and example code (http://gf.johng.cn/702801));
- The ghttp.Server routing feature now includes field matching rules, supporting dynamic routing rules like
/order/list/{page}.html
(http://gf.johng.cn/702766)); - Added pagination URL rule generation templates to the gpage pagination package, allowing the use of the
{.page}
variable to specify the page number position (http://gf.johng.cn/716438)); - Added the gmap.Map object, an alias for gmap.InterfaceInterfaceMap;
New Features
- gdb added MaxIdleConnCount/MaxOpenConnCount/MaxConnLifetime settings and the SetMaxConnLifetime method;
- ghttp.Client added HTTP account password setting function (SetBasicAuth);
- glog added adaptive adjustment for system newline characters (\n|\r\n);
- Added glog console debug mode printing switch (SetDebug);
- gcfg added the SetFileName method to set the default configuration file name;
- gcfg/gjson/gparser packages added Int8/16/32/64, Uint8/16/32/64 methods;
- Added encapsulation for gzip methods (Zip/Unzip);
- gview added template variable delimiter setting method SetDelimiters;
- ghttp.Response added Writef, Writefln methods;
Improvements
- Improved gfilepool file pointer pool design; improved gfile text content writing, with added pointer pool usage;
- gdb package added debug mode feature, supporting executed SQL list results retrieval in debug mode;
- Improved gproc inter-process communication mechanism, added process message grouping feature and limited queue size;
- gdb result method processing added ToXml/ToJson methods;
- Changed gregx package name to gregex;
- Improved gtime.StrToTime method, added automatic conversion for common standard date-time formats, and automatic timezone recognition, with adjustments to gconv, gvalid referencing this package;
- Added character set conversion encapsulation, with gxml package using the newly added character set conversion package for handling;
- ghttp.Server.EnableAdmin page Restart interface supports GET parameter newExeFilePath;
- ghttp.Server graceful restart mechanism added customizable restart executable file path, especially useful for Windows systems (as Windows does not support executable file overlay updates);
- Improved ghttp.Server static file retrieval design, with a lookup mechanism in the main package source directory during development environments; improved gcfg/gview lookup mechanism in the main package source directory;
- Optimized gcache design, with the LRU feature not enabled by default; optimized gtype/gcache benchmark scripts; added gregx benchmark scripts, improved design for enhanced performance;
- gfile package added GoRootOfBuild method to retrieve the GOROOT value at compile time; improved backtrace GOROOT path filtering in the glog package;
- Improved grpool code quality, and improved pool goroutine quantity limit design;
- Improved gdb.Map/List and g.Map/List type definitions, using alias features to support native type inputs (map/slice), and fixed gdb.Model.Update method parameter handling issue;
- Adjusted ghttp package example code directory structure, added ghttp.Client custom Header methods, ghttp.Cookie added Map method for retrieving all cookie values submitted by the client, returned as a map;
- Removed getcharset method from gcharset;
- Removed common basic data type conversion retrieval methods from gmap;
- Improved gconv.String method, using json.Marshal for conversion if basic type string conversion is not possible;
- gvalid.CheckObject method name changed to gvalid.CheckStruct;
Bug Fixes
- Fixed gstr.IsNumeric error;
- Fixed error when XML encoding charset is non-UTF-8;
- Fixed gconv package float32 to float64 precision issue;
- Fixed gpage package pagination count issue;
- Fixed gdb batch data Save error;
- Removed usage of math.MAXINT64 constant in gpool to fix int64 to int type conversion error, compatible with 32-bit systems;
- Fixed ghttp package initializing related asynchronous goroutines without using Server issue.