github gogf/gf v2.10.0
GoFrame Release v2.10.0

8 hours ago

What's Changed

Feature

  • feat: update linter config and deprecation notice by @houseme in #4399
  • feat(ci): upgrade workflow checkout version v5 by @houseme in #4381
  • feat(cmd/gendao): add wildcard pattern support for tables configuration by @lingcoder in #4632
  • feat(cmd/gf): add broad matching to gf gen dao's tableEx attribute. by @joy999 in #4453
  • feat(cmd/gf): Add support for the Loongson architecture (loong64) by @LanceAdd in #4467
  • feat(cmd/gf): improve and enhance gen ctrl by @oldme-git in #4325
  • feat(cmd/gf): improve gf run watching by @hailaz in #4573
  • feat(cmd/gf): init update by @hailaz in #4572
  • feat(container): Add NewXXXWithChecker function for gmap/gset/gtree by @LanceAdd in #4610
  • feat(container/garray): add TArray by @joy999 in #4466
  • feat(container/garray): enhance generic array implements by @joy999 in #4482
  • feat(container/garray): Sorted T Array by @joy999 in #4470
  • feat(container/glist): add generic list feature by @joy999 in #4483
  • feat(container/gmap): add generic list map feature by @joy999 in #4520
  • feat(container/gmap): add generic map feature by @joy999 in #4484
  • feat(container/gpool): add generic pool feature by @joy999 in #4493
  • feat(container/gqueue): add generic queuefeature by @joy999 in #4497
  • feat(container/gring): add generic ring feature by @joy999 in #4496
  • feat(container/gset): add generic set feature by @joy999 in #4492
  • feat(container/gtree): add generic tree feature by @joy999 in #4522
  • feat(contrib/drivers): more database drivers by @gqcn in #4553
  • feat(contrib/drivers/dm): add Replace/InsertIgnore support and field type/length enhancements for dm database by @gqcn in #4541
  • feat(contrib/drivers/dm): add WherePri support by @tiger1103 in #4157
  • feat(contrib/drivers/dm&pgsql&mssql&oracle): add Replace/LastInsertId features support for dm/pgsql/mssql/oracle by @gqcn in #4547
  • feat(contrib/drivers/gaussdb): add gaussdb driver support by @gqcn in #4563
  • feat(contrib/drivers/mssql): mssql support LastInsertId by @lxy1151 in #4051
  • feat(contrib/drivers/pgsql): add array type numeric[] and decimal[] converting to Go []float64 support #4457 by @The-night-elves in #4511
  • feat(contrib/drivers/pgsql): more field types converting support by @ivothgle in #3737
  • feat(contrib/registry): update nacos sdk to 2.3.5 by @yuluo-yx in #4628
  • feat(contrib/registry/nacos): add SetDefaultEndpoint and SetDefaultMetadata methods by @wangle201210 in #4608
  • feat(crypto): add gsha256 by @joy999 in #4558
  • feat(crypto/grsa): Add RSA encryption and decryption function by @LanceAdd in #4571
  • feat(database/gdb): add MaxIdleConnTime configuration for SetConnMaxIdleTime support by @lingcoder in #4625
  • feat(database/gdb): Add the function of obtaining all configurations to facilitate business operations such as verification after addition. by @sxp20008 in #4389
  • feat(database/gdb): Optimize SoftTime feature by @LanceAdd in #4559
  • feat(gdb): Allow to set table field metadata and allow to generate table fields registration code when generating dao by @LanceAdd in #4460
  • feat(gdb/gdb_model_lock.go): gdb support lock update skip locked by @smzgl in #4607
  • feat(instance): migrate instance containers to type-safe generics by @LanceAdd in #4617
  • feat(net/ghttp): enhance GetHeader method to support default values by @hailaz in #4210
  • feat(os/gcfg): Add file watcher with custom callback support by @LanceAdd in #4446
  • feat(os/gcfg): add Loader with automatic struct binding and config watching (like Spring Boot @ConfigurationProperties) by @LanceAdd in #4575
  • feat(os/gfile): add MatchGlob function with globstar support (#4570) by @hailaz in #4574
  • feat(util/gconv): Add OmitEmpty and OmitNil options to Scan function by @LanceAdd in #4584
  • feat(util/gpage): marked deprecated by @gqcn in #4230
  • feat(util/gvalid): add more rules: alpha,alpha-dash,alpha-num,lowercase,numeric,uppercase by @yuluo-yx in #4601

Enhancement

  • perf(net/gclient): optimize default http.Transport connection pool configuration by @lxzan in #4390
  • refactor: interface{} to any and reflect.Ptr to reflect.Pointer by @hailaz in #4395
  • refactor(cmd/gf): Optimize run command to reload only on actual file changes by @windvalley in #4476
  • refactor(container): add default nil checker, rename RegisterNilChecker to SetNilChecker, migrate instance containers to type-safe generics by @LanceAdd in #4630
  • refactor(contrib/clickhouse): optimization clickhouse by @wanghaolong613 in #4499
  • refactor(database/gdb): add quote for FieldsPrefix by @hicolin in #4485
  • refactor(database/gdb): simplify order and group by alias quoting by @lingcoder in #4555
  • refactor(encoding/gjson): enhance auto type checks when loading data without type specified by @gqcn in #4637
  • refract(gerror): add ITextArgs interface and its implements, mainly for i18n that needs text and args separately by @gqcn in #4597

Bug Fixes

  • fix: #4269 by @hailaz in #4412
  • fix: disable specific staticcheck rules and update lint config by @houseme in #4396
  • fix: Improve the typeMap check logic of "gf gen dao" by @joy999 in #4410
  • fix: path ./cmd/gf by @hailaz in #4414
  • fix: report coverage on the latest go version by @hailaz in #4398
  • fix: revert #4388 by @hailaz in #4392
  • fix: spacing in min value validation message by @houseme in #4388
  • fix: the use of the deprecated variable {format} in the file util/gval… by @shubo83 in #4258
  • fix: update copyright notice in multiple files to specify correct file reference by @hailaz in #4518
  • fix: Update dependencies and exclude test data from go.mod processing by @hailaz in #4415
  • fix: update dependencies to version v2.9.1 for various contrib modules and drivers by @hailaz in #4386
  • fix:(cmd/gf): matching for table ex fix bug by @joy999 in #4458
  • fix(ci): add cache cleaning step to prevent 'no space left on device' errors by @hailaz in #4513
  • fix(ci): change base image from expired ubuntu-22.04 to ubuntu-latest by @gqcn in #4273
  • fix(ci): Free Disk Space by @hailaz in #4529
  • fix(ci): update script permissions and add docker cleanup functionality by @hailaz in #4523
  • fix(cmd/gendao): fix overlapping shardingPattern matching issue by @lingcoder in #4631
  • fix(cmd/gf): "unknown time zone" when using "gf gen dao" for clickhouse on windows platform by @joy999 in #4368
  • fix(cmd/gf): add extra option to controller the behavior downloading … by @wanghaolong613 in #4435
  • fix(cmd/gf): fix gen sharding dao in multiple shardingPattern tables … by @fainc in #4379
  • fix(cmd/gf): fix genservice losing versioned import paths (#4242) by @lingcoder in #4638
  • fix(cmd/gf): fix gf env and gf build --dumpEnv command error by @lingcoder in #4635
  • fix(cmd/gf): fix gf gen dao with removeFieldPrefix by @zhang5788 in #4243
  • fix(cmd/gf): fix gf gen enums output path error when using relative path by @lingcoder in #4636
  • fix(cmd/gf): Fixed an issue where formatting caused import errors in gf init by @hailaz in #4598
  • fix(cmd/gf): improve init command with version retry and gofmt support by @hailaz in #4592
  • fix(cmd/gf): run AddSigHandlerShutdown cannot work well) by @wanghaolong613 in #4441
  • fix(cmd/gf): The problem of the command 'gen dao' becoming very slow by @hailaz in #4498
  • fix(container): Add NilChecker Support to gmap, gset, and gtree for Typed Nil Issue Resolution by @LanceAdd in #4605
  • fix(container/gqueue): Optimize queue length calculation and loop structure in test cases by @hailaz in #4455
  • fix(contrib/config/apollo):where gcfg config apollo failed to retrieve configurations for multiple namespaces, where watch apollo change resulted in missing configurations. by @xiongchao123 in #4509
  • fix(contrib/drivers): resolve field duplication issue when same table/column names exist across different MySQL/MariaDB databases by @smzgl in #4577
  • fix(contrib/drivers/dm): support muti-line sql statement (#4163) by @sanrentai in #4164
  • fix(contrib/drivers/gaussdb): remove github.com/lib/pq dependence by @hailaz in #4615
  • fix(contrib/drivers/mssql): update tables SQL query for better compatibility by @li-zheng-hao in #4170
  • fix(contrib/drivers/mysql): Fix unit test issue for batch insert in MySQL driver by @hailaz in #4456
  • fix(contrib/drivers/pgsql): Fixed the problem of overlapping fields in the same table name in pgsql multiple schema mode by @iamcc30 in #4375
  • fix(contrib/drivers/pgsql): Merge duplicated fields, especially for key constraints. by @wangle201210 in #4465
  • fix(database/gdb): Resolved the schema error in the database output log when using the database sharding feature by @LanceAdd in #4319
  • fix(database/gdb): clickhouse can not support int128/int256/uint128/uint256 by @joy999 in #4370
  • fix(database/gdb): Fix GetArray return type and add Bools method by @hailaz in #4452
  • fix(database/gdb): fix iTableName interface detection when using WithAll with .Scan on reflect.Value objects by @smzgl in #4606
  • fix(database/gdb): performance improvement in fields grouping when in… by @wanghaolong613 in #4440
  • fix(database/gdb): Raw SQL Count ignores Where condition by @lingcoder in #4611
  • fix(database/gdb): Resolve column ambiguity in GROUP BY/ORDER BY with MySQL JOIN by @ljluestc in #4521
  • fix(database/gdb): Resolve the cache error overwriting caused by the use of fixed cache keys in pagination queries. by @LanceAdd in #4339
  • fix(database/gdb): skip field filtering when table/alias is unknown in FieldsPrefix by @lingcoder in #4602
  • fix(database/gdb): support multiple order fields in gdb_model_with and merged #4272 fix scanning functionality for deep slice types by @fainc in #4320
  • fix(database/gdb):Fix panic handling in DoCommit to prevent blocking on database driver panics by @Copilot in #4423
  • fix(database/gredis): gredis support get raw client by @YunzhiYike in #4306
  • fix(encoding/gjson): fix gjson data race by @973212983 in #4510
  • fix(gerror): Fixed serialization failure issue when gerror.Error text field contains quote symbols by @chen-mou in #4449
  • fix(gf/gen): Fixed a problem that could cause duplication when generating wit… by @DustScribe in #4268
  • fix(internal/utils): fix +.1 is pass checks numeric by @wanghaolong613 in #4374
  • fix(net/gclient): fix content-type 'application/json;charset=utf-8' … by @wanghaolong613 in #4369
  • fix(net/gclient): fix form field value truncation when uploading files by @lingcoder in #4627
  • fix(net/ghttp): attachment filename support utf8 by @wanghaolong613 in #4459
  • fix(net/ghttp): fix #4567 by @LanceAdd in #4569
  • fix(net/ghttp): Fix specification routing custom parameter recognition exception by @hailaz in #4549
  • fix(net/ghttp): improve GetMetaTag method to handle nil and type checks by @hailaz in #4284
  • fix(net/ghttp): Server Domain if is empty str, bind handler pattern will add @ which is not expect #4100 by @elonnzhang in #4101
  • fix(net/ghttp): wrong in-tag param parse for query param (#4227) by @UncleChair in #4228
  • fix(net/goai): add openapi uuid.UUID type support by @joy999 in #4604
  • fix(net/goai): fix g.Meta is passed as parameters of a request by @wanghaolong613 in #4397
  • fix(net/goai): swagger $ref replace by @xiaoyi510 in #4512
  • fix(os/gcache): defaultcache lazy init by @wanghaolong613 in #4468
  • fix(os/gcfg): adjust priority of env|cmd higer than config file (#4074) by @yangyanqing in #4587
  • fix(os/gcfg): ignore fsnotify event error to avoid package gcfg totally failing by @aitimate in #4400
  • fix(os/gcron): unit testing case of package gcron occasionally failed by @wanghaolong613 in #4419
  • fix(os/gtime): add handling for nil time pointers to avoid causing panic by @hailaz in #4323
  • fix(os/gtime): fix gtime time string handle logic by @Zjmainstay in #4409
  • fix(tracing): set database span kind to client by @minimAluminiumalism in #4334
  • fix(util/gconv): fix incompatable converting to nil pointer target from older version implement by @gqcn in #4224
  • fix(util/gconv): fix nested map conversion data loss in MapToMap by @lingcoder in #4612
  • fix(util/gconv): gconv unsafe str to bytes by @liov in #4600
  • fix(util/gutil): fix false positive cycle detection in Dump (#2902) by @lingcoder in #4626

Other

  • build(contrib): upgrade nacos registry&config by @lingcoder in #4473
  • chore: add OpenSSF Scorecard for README.md by @fengshunli in #3696
  • chore: bump golang.org/x/tools to v0.34.0 for Go 1.25 compatibility by @chenrui333 in #4313
  • chore: chmod +x update_version.sh by @hailaz in #4413
  • chore: translte zh comment to en by @yuluo-yx in #4591
  • chore: upgrade dependencies to latest versions and fix security vulne… by @houseme in #4237
  • chore: upgrade golangci-lint configuration and optimize codebase by @houseme in #4236
  • chore(contrib/nosql/redis): bump github.com/redis/go-redis/v9 from 9.7.0 to 9.12.1 in /contrib/nosql/redis by @dependabot[bot] in #4215
  • chore(deps): Update dependent versions to enhance compatibility and security by @hailaz in #4380
  • chore(polaris): Bump github.com/polarismesh/polaris-go from v1.5.8 to v1.6.1 by @houseme in #4241
  • chore(tablewriter): upgrade to v1.0.9 and refactor table rendering logic by @zishang520 in #4352
  • ci: Add CodeQL analysis workflow configuration by @hailaz in #4436
  • ci: Add Scorecard workflow for supply-chain security by @hailaz in #4437
  • ci(docker-services): change chinese printing message to english by @gqcn in #4599
  • ci(release): disable go module caching in release workflow by @Copilot in #4539
  • docs: update Chinese documentation and add README.zh_CN.MD by @hailaz in #4534
  • docs(i18n/gi18n): deleting the duplicate package documents by @qiulaidongfeng in #4251
  • test(cmd/gf): add unit tests for genenums package by @lingcoder in #4641
  • test(cmd/gf): add unit tests for geninit package by @lingcoder in #4640
  • test(cmd/gf): add unit tests for pack command by @lingcoder in #4642
  • test(cmd/gf): enhance integration tests for gen pb command by @lingcoder in #4644
  • test(cmd/gf): enhance integration tests for gen service command by @lingcoder in #4645
  • test(cmd/gf): enhance unit tests for fix command by @lingcoder in #4643
  • test(errors/gcode,gerror): add unit tests for error handling interfaces and methods by @hailaz in #4586

New Contributors

Full Changelog: v2.9.0...v2.10.0

Don't miss a new gf release

NewReleases is sending notifications on new releases.