This version is actually the major release of v2.0. To avoid the strict requirement of go module mechanism for v2 and above versions needing to modify import and add v2 suffix, it was released using v1.9.
New Features
- Added
gfcommand line development assistant tool: https://goframe.org/toolchain/cli - Added
gresresource manager module: https://goframe.org/os/gres/index - Refactored
Sessionfunctionality, addedgsessionmodule, andWebServerdefaults to file storageSession: https://goframe.org/net/ghttp/session WebServeradded middleware feature, retaining the original HOOK design, both can achieve request interception, pre-processing, etc.: https://goframe.org/net/ghttp/router/middleware- Added
gi18nlocalization management module: https://goframe.org/i18n/gi18n/index - Added
ginimodule: https://goframe.org/encoding/gini/index WebServeradded more convenient hierarchical routing registration method: https://goframe.org/net/ghttp/group/levelgcmdcommand line parameter parsing module refactored, addedParserparsing object: https://goframe.org/os/gcmd/index- Added
gdebugmodule for stack information retrieval/printing: https://goframe.org/debug/gdebug/index
Major Adjustments
- Removed methods marked as
deprecatedin1.xversions; - Adjusted container classification modules to default to non-concurrent safety;
- Directory adjustments:
- Removed
thirddirectory, unified management of package dependencies withgo module; - Moved original modules in
gdirectory to framework main directory, originalgmodule moved toframe/gdirectory; - Changed original
gegsample code directory name to.example;
- Removed
Functional Improvements
ghttp- Improved
Requestparameter parsing method: https://goframe.org/net/ghttp/request - Improved cross-domain request functionality, added
Originsetting and verification feature: https://goframe.org/net/ghttp/cors - Changed
TTLconfiguration data type ofCookieandSessiontotime.Duration; - Added simultaneous transmission of
SessionIdthroughHeader/Cookie; - Added
ConfigFromMap/SetConfigWithMapmethods to configure WebServer withmapparameter; - Improved default
CORSconfiguration with default support for commonHeaderparameters; - Added
IsExitErrormethod for developers to customizerecovererror handling, filtering non-exception errors defined by the framework; - Added
SetSessionStorageconfiguration method for customSessionstorage; ghttp.Requestadded more parameter retrieval methods;
- Improved
gdb- Added automatic escape (
Quote) feature for some SQL fields; - Added support for
sliceparameters in method operations and chain operations; - Added
SetLoggermethod for custom database log printing; - Added
Master/Slavemethod for selecting master-slave nodes for database operations; - Added unit tests for
mssql/pgsql/oracle; - Supported full integration parameterized SQL statement debugging printing in
debugmode; - Added more functional methods;
- Added automatic escape (
glog- Added
Defaultmethod to get the defaultLoggerobject; - Added
StackWithFiltermethod for custom stack printing filtering; - Added more functional methods;
- Added
gfile- Renamed some methods:
Get/PutBinContentschanged toGet/PutBytes; - Added
ScanDirFilemethod for retrieving file directories only, supporting recursive search; - Added more functional methods;
- Renamed some methods:
gview- Added
SetI18nmethod for setting customgi18nlocalization objects for view objects; - Added built-in support for
gresresource manager;
- Added
gcompress- Added file/directory compression/decompression methods for
zipalgorithm; - Compression parameters support multiple paths for file/directory;
- Added file/directory compression/decompression methods for
gconv- Improved support for
[]bytedata type parameters; - Added
Unsafeconversion method for increased conversion efficiency in specific scenarios; - Added
MapDeep/StructDeep/StructsDeepmethods for recursivestructconversion;
- Improved support for
gjson/gparser- Improved automatic type recognition functionality;
- Added
LoadJson/LoadXml/LoadToml/LoadYaml/LoadInimethods for custom data type content loading; - Added more functional methods;
gerror- Improved error stack retrieval logic;
- Added more functional methods;
gmap/garray/gset/glist/gvar- Improved concurrent safety benchmarking scripts;
- Changed
garray.StringArraytogarray.StrArray; - Added more functional methods;
gdes- Standardized method name changes;
gstr- Added
Camel/Snakenaming conversion methods; - Added more functional methods;
- Added
genv- Added more functional methods;
Bug Fix
- Fixed issue with
gvalidcustomizationtagerrors not working when validatingstruct; - Fixed automatic content type recognition failure in
gcfgconfiguration management module under specific conditions; - Fixed concurrent safety issue in
gqueuewhen the user actively closes the queue; - Fixed integer overflow issue in
sessionwhen developer sets excessively largeTTL.