New Features
gf-orm
adds support for thesqlite
database type (http://gf.johng.cn/database/orm/database);- Added
gkafka
module with a client program encapsulation for kafka, supporting group consumption and specified start positions, along with a user-friendly API interface (http://gf.johng.cn/database/gkafka/index); - Added support for the latest Go language version's
go modules
feature; - Added
gcron
scheduling task module (http://gf.johng.cn/os/gcron/index); WebServer
adds features to acquire/print route registration items, providing a comprehensive view of all route and callback registrations;- The template engine adds global variable management and several commonly used built-in functions and variables (http://gf.johng.cn/os/gview/funcs);
gredis
improved to singleton operation mode (based on the underlying connection pool feature), eliminating the need for developers to explicitly call theClose
method to shut down after eachredis
server operation (http://gf.johng.cn/database/gredis/index);gf-orm
adds autoClose
feature for database operations (based on underlying connection pool feature), so developers no longer need todefer db.Close()
, and addsg.DB
database object singleton alias (http://gf.johng.cn/database/orm/linkop);- Added
gvar
universal dynamic variable module (http://gf.johng.cn/container/gvar/index); - Data structure container adds
concurrent safety feature enable/disable function
, improving performance in non-concurrent safety mode; - New
gmlock
memory lock module added (http://gf.johng.cn/os/gmlock/index); - Added
gaes
algorithm module (http://gf.johng.cn/crypto/gaes/index); - The
gproc
module adds method to executeshell
commands (http://gf.johng.cn/os/gproc/index); - New
gfcache
module added for file content operations with automatic cache updates (documentation pending);
New Features
glog
adds chain operation methods, log level management control, category management, and debug management functions;g.View
adds group name setting, supporting multiple named singleton template engine objects throughg.*
object manager;glog
adds customization for file name format, supportinggtime date format
;gconv
addsInts/Uints/Floats/Interfaces
conversion methods;gjson
addsAppend
method;gparser
addsNewUnsafe/Append
method;gcache
addsGetOrSet/GetOrSetFunc/GetOrSetFuncLock
method;gset
addsLockFunc/RLockFunc
methods;ghttp.Response
methods enhanced withParseTpl/ParseTplContent/TplContent
methods, changingTemplate
toTpl
method;ghttp.Request
adds method to obtain user's real IP judgment;Session
addsContains
method;- Enhanced
ghtml
module with several new methods; gcache
adds newContains/SetIfNotExist
methods;gvalid
addsError
object for validation error management;gvalid
module adds support forstruct tag
validation rules and custom error message binding (http://gf.johng.cn/util/gvalid/index);ghttp
adds input parameter andstruct
binding mechanism
, with support forparams
tags (http://gf.johng.cn/net/ghttp/service/handler);ghttp.Request
adds server-sideBasicAuth
functionality (documentation pending);gvalid
adds field validation alias for customizing return result fields and updates modules in WebServer usage;gf-orm
chain operation addsForPage
method and adjustsChunks
method;ghttp
object route registration addsInit&Shut
auto-callback methods, along with duplicate route registration detection;gfsnotify
adds default recursiveAdd/Remove
feature;ghttp.Response
addsServiceFile
method;- Various other new features;
Feature Improvements
- Improved
ghttp.Server
configuration management; - Enhanced
gcache
underlying object inheritance structure, refined some design details to improve performance; - Improved
gfpool
file pointer pool, fixed some errors, enhanced performance, and added benchmark test code; - Enhanced
gmap
series of concurrent safe map data structures with several usability methods; - Improved
gconv.Struct
object conversion functionality (http://gf.johng.cn/util/gconv/index); - Improved
grand
random number generation rules to ensure extremely high random number generation performance, guaranteeing different random values each time a random method is called (http://gf.johng.cn/util/grand/index); - Improved
gfile
file content operation methods with several commonly used file content read methods; - Enhanced
gtime
module and added time zone conversion methods; - Improved
COOKIE
, removing lock mechanism; - Enhanced
SESSION
retrieval methods with multiple type retrievals; - Improved
g.DB/g.Config
singleton cache key names; - Enhanced
gtcp/gudp
timeout error judgment mechanism; - Improved
gtype
underlying operations with atomic methods; - Enhanced
gvalid
default value validation forstring
attributes instructs
; - Improved
gvalid
non-essential validation under associated rules; - Enhanced
gf-orm
debug mode with automatic log output functionality; ghttp.Server/gspath
module static file retrieval improved;- Optimized
ghttp.ServerConfig
configuration, addingstruct/method
name to uri
conversion rules with flexible configuration viaSetNameToUri
method (http://gf.johng.cn/net/ghttp/service/object); - Improved
*any/:name
route matching rules to support unnamed*/:
route rules; - Changed default configuration file name from
config.yml
toconfig.toml
(http://gf.johng.cn/os/gcfg/index); - Adjusted service registration
BindControllerMethod
andBindObjectMethod
logic to bind routes to specified methods; - Improved
garray
binary search method with secure operations; - Improved
gdb.Result/Recorde
ToXml
method with optionalrootTag
parameter; - Various other improvements;
Bug Fixes
- Fixed
ghttp.Server
restart failure issue onwindows
; - Addressed
ghttp.Server
service registration and callback registration route duplication issue; - Fixed deadlock issue with
garray
sortable arrayAdd
variadic parameter; - Resolved
gfsnotify
default recursive monitoring of entire directories added bygspath.Add
; - Fixed
ghttp.BindParams
escaping issue for@file
upload identifiers; - Resolved log path loss issue in
ghttp.Server
; - Addressed multi-WebServer status detection issue;
- Fixed
gvalid
modulemin/max
validation issues; - Resolved route binding issue on
Binded
route for controller and execution object service registration; - Fixed
gvalid.CheckStruct
custom error notification issue; - Solved
ghttp.Server
hook
andserve
method routing impact and added redirection method; - Various other fixes;
Other Changes
- Removed
gfile.IsExecutable
method; - Directory adjustment, moving
encryption/decryption
related packages fromencoding
tocrypto
; - Added debug information to
gfsnotify/gfcache
; gf-orm
permits database write ofnull
if the writable key value isnil
;- Unified use of
gview.Params
type as template variable type; - Renamed
gconv.MapToStruct
method togconv.Struct
; - Improved
ghttp.Server
terminal messages for restart and stop; - Enhanced
gring
module with addition ofJosephus problem
code asgring
example program; - Various other changes;