QuickStart Documents ShowCase Release Community Version: 2.8.x(Latest) On this page
New Features/Improvements
gcron
scheduled task module adds operation log recording feature: https://goframe.org/os/gcron/index
gredis
adds global group configuration features along with additional configuration options maxIdle/maxActive/idleTimeout/maxConnLifetime
: https://goframe.org/database/gredis/index
gcfg
module adds more default configuration file retrieval paths, introduces global group configuration features, and provides the Instance
singleton method: https://goframe.org/os/gcfg/index
gview
module adds more default configuration file retrieval paths and provides the Instance
singleton method: https://goframe.org/os/gview/index
ghttp
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 during HTTP Code 302
redirections;
Adds security checks for SESSION ID
;
Adds support for HTTPS
based WebSocket
(WSS
): https://goframe.org/net/ghttp/websocket/index
Request
object adds Error
method for logging custom error messages to the WebServer
error log;
Other improvements;
gdb
module new features and improvements:
Adds Instance
singleton management method;
Adds Structs/Scan
chaining operation methods, gdb.DB/TX
adds GetStructs/GetScan
methods for result set struct/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 to And
conditions;
Supports slice
condition parameters, commonly used in SELECT IN
queries, e.g., Where("uid IN(?)", g.Slice{1,2,3})
;
Supports embedding conditions in key
of map
type condition parameters, e.g., Where(g.Map{"uid>?", uid})
;
gconv
and gvalid
modules improve and remove conversion/validation for private struct
method attributes;
gconv.Map
conversion method adds support for json tag
: -
, omitempty
: https://goframe.org/util/gconv/map
gstr
module adds case-insensitive replace methods ReplaceI/ReplaceIByArray/ReplaceIByMap
;
gutil
module adds IsEmpty
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 method g.IsEmpty
;
gutil
module adds Export
method to export and return formatted output of variable contents as a string, along with a shortcut method g.Export
;
gspath
adds cache and non-cache retrieval methods Search
/SearchWithCache
;
gjson
module adds default UseNumber
feature support;
gmap
adds SetIfNotExistFunc/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 converting int
parameters;
Fixed HTTP Basic Auth
verification issue in ghttp.Request
;
Fixed concurrency safety issue in gxml
for non-UTF-8
encoded content conversion;
Fixed formatting issues in gtime
for some Format
(G
& j
) specifications;
Fixed method issue in gudp.Conn
for obtaining client connection address RemoteAddr
;
Fixed GetOrSetFuncLock
method in gmap/gcache
module by adding nil
return value check for callbacks, saving only non-nil return values.