New Features/Improvements
- Refactored and improved
glog
module:- Removed all locks in the log module, redesigned as lock-free for improved execution performance
- Added asynchronous output feature for log content: https://goframe.org/os/glog/async
- Added support for
Json
format in log output content: https://goframe.org/os/glog/json - Added
Flags
feature support including file line number printing, custom time format, and asynchronous output control: https://goframe.org/os/glog/flags - Added
Writer
interface support for developers to customize log functionality extensions or integrate with third-party services/modules: https://goframe.org/os/glog/writer - Changed method name
SetStdPrint
toSetStdoutPrint
- Changed chain method name
StdPrint
toStdout
- Deprecated
*fln
log output methods,*f
methods now support automatic line breaks - Added more chain method supports: https://goframe.org/os/glog/chain
- Refactored and improved
gmap
module:- Added support for more data formats:
HashMap
/ListMap
/TreeMap
- Simplified type names, e.g.,
gmap.StringInterfaceMap
simplified togmap.StrAnyMap
- Improved
Map/Keys/Values
methods for better performance - Renamed
BatchSet
/BatchRemove
toSets
/Removes
- Added more functional method supports: https://goframe.org/container/gmap/index
- Added support for more data formats:
- Improved
gtime
time module:- Added and improved more class
PHP
time format support - Added more functional methods, such as
FormatTo
/LayoutTo
, etc. - See development documentation: https://goframe.org/os/gtime/index
- Added and improved more class
- Improved
gdb
database module:- Added support for data conversion for inherited structures: https://goframe.org/database/gdb/senior
- Added
GetLastSql
method to get the most recent executed SQL statement in debug mode - Other detailed improvements
- Improved
gtcp
communication module:- Enhanced detail handling to improve communication performance;
- Added
TLS
server/client communication support: https://goframe.org/net/gtcp/tls - Added simple protocol support for developers to encapsulate/decapsulate, solving packet sticking/fragmentation issues: https://goframe.org/net/gtcp/conn/pkg
- Added
Close
method for TCP server - For more details, see the development documentation: https://goframe.org/net/gtcp/index
- Improved
gconv
type conversion module- Renamed
gconv.TimeDuration
conversion method togconv.Duration
- Added
gconv.StructDeep
andgconv.MapDeep
methods, supporting recursive conversion - See development documentation: https://goframe.org/util/gconv/struct
- Renamed
- Improved
ghttp
module:- Added
http/https
field to the log output: https://goframe.org/net/ghttp/logs - Added
ghttp.Server.SetKeepAlive
setting method to enable/disableKeepAlive
feature - Added
ghttp.Request.GetUrl
method to get the current full URL request address ghttp.Client
client supports the developer's customTransport
attribute,ghttp.Client.Post
method supportsbrowser mode
: https://goframe.org/net/ghttp/client
- Added
- Added
gtree
tree data structure container support: https://goframe.org/container/gtree/index - Improved
gudp
communication module, please refer to the development documentation for details: https://goframe.org/net/gudp/index - Improved
gcfg
configuration management module, allGet*
methods add default value support: https://goframe.org/os/gcfg/index gredis
module addedDoVar
/ReceiveVar
methods to facilitate developer's flexible data format conversion of execution results: https://goframe.org/database/gredis/indexgcache
moduleBatchSet
/BatchRemove
method names changed toSets
/Removes
- Improved
gjson
/gparser
modules, adding more methods: https://goframe.org/encoding/gjson/index - Improved
gfile.MainPkgPath
method to support different platform development environments; - Improved
grpool
coroutine pool module for enhanced execution performance: https://goframe.org/os/grpool/index - Improved
TryCatch
method, by default suppressing and ignoring errors whenCatch
parameter is not provided - Improved
gmlock
module, addedTryLockFunc
/TryRLockFunc
methods, and addedTryLockFunc
/TryRLockFunc
methods forgmlock.Mutex
advanced mutex lock object - Removed
gvar.VarRead
interface type support
Bug Fixes
- Resolved conflicts when using
gdb
module with other third-partyORM
modules concurrently; - Fixed detailed logic issues in the
gcron.AddOnce
method; - Fixed incorrect empty property validation in the internal
empty
moduleIsEmpty
method; - Fixed concurrency safety issue in
gview
template engine; - Fixed SESSION initialization expiration time issue in
ghttp.Server
;