New Features/Improvements
gcron
scheduled task module adds operation log recording feature: https://goframe.org/os/gcron/indexgredis
adds global group configuration features along with additional configuration optionsmaxIdle/maxActive/idleTimeout/maxConnLifetime
: https://goframe.org/database/gredis/indexgcfg
module adds more default configuration file retrieval paths, introduces global group configuration features, and provides theInstance
singleton method: https://goframe.org/os/gcfg/indexgview
module adds more default configuration file retrieval paths and provides theInstance
singleton method: https://goframe.org/os/gview/indexghttp
module new features and improvements:- Adds
CORS
HTTP(S) cross-origin request features: https://goframe.org/net/ghttp/cors - Adds
TLSConfig
configuration feature; - Removes the
error
return value from routing registration methods, and prints errors directly to the terminal/log file when registration errors occur; - Adds
Set-Cookie
support duringHTTP Code 302
redirections; - Adds security checks for
SESSION ID
; - Adds support for
HTTPS
basedWebSocket
(WSS
): https://goframe.org/net/ghttp/websocket/index Request
object addsError
method for logging custom error messages to theWebServer
error log;- Other improvements;
- Adds
gdb
module new features and improvements:- Adds
Instance
singleton management method; - Adds
Structs/Scan
chaining operation methods,gdb.DB/TX
addsGetStructs/GetScan
methods for result setstruct/slice
mapping conversion: https://goframe.org/database/gdb/chaining - Adds
Safe
chaining operation method (not concurrent-safe by default) for chaining safety control: https://goframe.org/database/gdb/chaining - Improvements to
Where
chaining operation method:- Supports any
string/map/slice/struct/*struct
types; - Adjusted logic to automatically convert multiple
Where
method calls in chaining operations toAnd
conditions; - Supports
slice
condition parameters, commonly used inSELECT IN
queries, e.g.,Where("uid IN(?)", g.Slice{1,2,3})
; - Supports embedding conditions in
key
ofmap
type condition parameters, e.g.,Where(g.Map{"uid>?", uid})
;
- Supports any
- Adds
gconv
andgvalid
modules improve and remove conversion/validation for privatestruct
method attributes;gconv.Map
conversion method adds support forjson tag
:-
,omitempty
: https://goframe.org/util/gconv/mapgstr
module adds case-insensitive replace methodsReplaceI/ReplaceIByArray/ReplaceIByMap
;gutil
module addsIsEmpty
method to determine if the given variable is empty (0 for integer, false for boolean, 0 length for slice/map, nil for others), along with a shortcut methodg.IsEmpty
;gutil
module addsExport
method to export and return formatted output of variable contents as a string, along with a shortcut methodg.Export
;gspath
adds cache and non-cache retrieval methodsSearch
/SearchWithCache
;gjson
module adds defaultUseNumber
feature support;gmap
addsSetIfNotExistFunc/SetIfNotExistFuncLock
methods;- Migrates
greuseport
module to a new repository: https://github.com/gogf/greuseport - Numerous unit test improvements;
Bug Fix
- Fixed resource competition issue in
gqueue
module; - Fixed conversion failure issue in
gconv.GTime
; - Fixed byte overflow issue in
gconv.String
when convertingint
parameters; - Fixed
HTTP Basic Auth
verification issue inghttp.Request
; - Fixed concurrency safety issue in
gxml
for non-UTF-8
encoded content conversion; - Fixed formatting issues in
gtime
for someFormat
(G
&j
) specifications; - Fixed method issue in
gudp.Conn
for obtaining client connection addressRemoteAddr
; - Fixed
GetOrSetFuncLock
method ingmap/gcache
module by addingnil
return value check for callbacks, saving only non-nil return values.