支持GoFrame
来源:GoFrame
浏览 10
扫码
分享
2024-12-09 22:00:14
New Features
gf-orm
adds support for the sqlite
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 the Close
method to shut down after each redis
server operation (http://gf.johng.cn/database/gredis/index);gf-orm
adds auto Close
feature for database operations (based on underlying connection pool feature), so developers no longer need to defer db.Close()
, and adds g.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 execute shell
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 through g.*
object manager;glog
adds customization for file name format, supporting gtime date format
;gconv
adds Ints/Uints/Floats/Interfaces
conversion methods;gjson
adds Append
method;gparser
adds NewUnsafe/Append
method;gcache
adds GetOrSet/GetOrSetFunc/GetOrSetFuncLock
method;gset
adds LockFunc/RLockFunc
methods;ghttp.Response
methods enhanced with ParseTpl/ParseTplContent/TplContent
methods, changing Template
to Tpl
method;ghttp.Request
adds method to obtain user’s real IP judgment;Session
adds Contains
method;- Enhanced
ghtml
module with several new methods; gcache
adds new Contains/SetIfNotExist
methods;gvalid
adds Error
object for validation error management;gvalid
module adds support for struct tag
validation rules and custom error message binding (http://gf.johng.cn/util/gvalid/index);ghttp
adds input parameter and struct
binding mechanism
, with support for params
tags (http://gf.johng.cn/net/ghttp/service/handler);ghttp.Request
adds server-side BasicAuth
functionality (documentation pending);gvalid
adds field validation alias for customizing return result fields and updates modules in WebServer usage;gf-orm
chain operation adds ForPage
method and adjusts Chunks
method;ghttp
object route registration adds Init&Shut
auto-callback methods, along with duplicate route registration detection;gfsnotify
adds default recursive Add/Remove
feature;ghttp.Response
adds ServiceFile
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 for string
attributes in structs
; - 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, adding struct/method
name to uri
conversion rules with flexible configuration via SetNameToUri
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
to config.toml
(http://gf.johng.cn/os/gcfg/index); - Adjusted service registration
BindControllerMethod
and BindObjectMethod
logic to bind routes to specified methods; - Improved
garray
binary search method with secure operations; - Improved
gdb.Result/Recorde
ToXml
method with optional rootTag
parameter; - Various other improvements;
Bug Fixes
- Fixed
ghttp.Server
restart failure issue on windows
; - Addressed
ghttp.Server
service registration and callback registration route duplication issue; - Fixed deadlock issue with
garray
sortable array Add
variadic parameter; - Resolved
gfsnotify
default recursive monitoring of entire directories added by gspath.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
module min/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
and serve
method routing impact and added redirection method; - Various other fixes;
Other Changes
- Removed
gfile.IsExecutable
method; - Directory adjustment, moving
encryption/decryption
related packages from encoding
to crypto
; - Added debug information to
gfsnotify/gfcache
; gf-orm
permits database write of null
if the writable key value is nil
;- Unified use of
gview.Params
type as template variable type; - Renamed
gconv.MapToStruct
method to gconv.Struct
; - Improved
ghttp.Server
terminal messages for restart and stop; - Enhanced
gring
module with addition of Josephus problem
code as gring
example program; - Various other changes;