github gogf/gf v2.9.0-beta
GoFrame Release v2.9.0-beta

one day ago

What's Changed

Feature

  • feat(cmd/gf): add ShardingPattern option for command gf gen dao to support generating dao files sharding tables by @gqcn in #4081

  • feat(cmd/gf): add gopackage option for command gf gen pbentity to specify go_package for generated proto files by @lazyjean in #4141

  • feat(cmd/gf): add typeMapping and fieldMapping feature support for command gf gen genpbentity by @zishang520 in #3970

  • feat(contrib/config/nacos): add OnChange callbacks configuration support by @LanceAdd in #4038

  • feat(contrib/drivers/pgsql): add array type varchar[] and text[] converting to Go []string support by @ninjashixuan in #4000

  • feat(contrib/metric/otelmetric): add metrics option WithExemplarFilter support by @qinyuguang in #4061

  • feat(contrib/registry/consul): add consul registry support by @gqcn in #4016

  • feat(contrib/registry/etcd): add retry machenism when keepalive lease expires by @gqcn in #4035

  • feat(database/gdb): add WhereExists/WhereNotExists by @gqcn in #4015

  • feat(database/gdb): add sharding feature for schema and table by @gqcn in #4014

  • feat(database/gdb): add transaction propagation&isolation level&readonly features by @gqcn in #4013

  • feat(errors/gerror): add As support by @gqcn in #4002

  • feat(gf/gen/pbentity): add a TablesEx configuration to exclude the specified table names by @wwwfeng in #4060

  • feat(net/ghttp): add Request.GetMetaTag to retrieve specific meta tag value by @PandaPy in #4185

  • feat(net/ghttp): add middleware MiddlewareGzip for compressing response content using gzip by @gqcn in #4008

  • feat(net/ghttp): move plugin remove logic to Shutdown() && call Shutdown() when Run() exits by @wlynxg in #4072

  • feat(net/goai): add enhanced response status interface by @UncleChair in #3896

  • feat(net/goai): add min, max, length, min-length, max-length and between support for OpenAPIv3 by @ninjashixuan in #3914

  • feat(net/goai): support OpenAPIv3.1 in description field for schema object by @wlynxg in #3978

  • feat(os/gsession): add RegenerateId/MustRegenerateId support by @gqcn in #4012

  • feat(util/gconv): add basic types conversion support for function Scan by @gqcn in #3991

  • feat: add submodule examples by @gqcn in #4137

  • refactor(util/gconv): add Converter feature for more flexable and extensible type converting by @gqcn in #4107

Enhancement

  • feat(cmd/gf): add controller comment support for command gf gen ctrl by @ywanbing in #4169
  • feat(cmd/gf): add interface functions generating for embedded struct of logic struct in command gen service by @joy999 in #3802
  • feat(cmd/gf): beautify progress bar of cli binary downloading for command gf up by @wangle201210 in #4094
  • feat(gctx): rename and remove gctx functions to prevent ambiguity by @mingzaily in #3892
  • feat(database/gdb): enable transaction propagation when using tx.GetCtx() after Begin by @cyjaysong in #4121
  • feat(net/gipv4): improve converting between uint32 and string by @oldme-git in #3988
  • feat(os/gcmd): add default value display for an argument by @wlynxg in #4083
  • feat(os/glog): add default time format 2006-01-02T15:04:05.000Z07:00 by @gqcn in #4134
  • feat(test/gtest): add map type support for AssertNI/AssertIN by @ansionfor in #4135
  • perf(contrib/drivers/pgsql): improve conversion performace for slice string field type by @ninjashixuan in #4046
  • refactor(cmd/gf): change default src value to api, path to internal/packed/packed_enums.go for command gen enums by @gqcn in #3996

Bug Fix

  • fix(ci): golangci-lint failed after upgrading go version to 1.24 by @gqcn in #4158
  • fix(ci/golangci): fix golangcl-lint git push and apply format code on Push by @houseme in #4077
  • fix(ci/golangci): fix golangcl-lint git push by @houseme in #4032
  • fix(cmd/gf): custom tags repeatedly added using command gf gen pb with -a option by @wangle201210 in #3966
  • fix(cmd/gf): incorrect environment variables printing before cli does some environment changes by @ppanphper in #3961
  • fix(cmd/gf): incorrect make command in project template by @gqcn in #3946
  • fix(contrib/config/polaris): it only supports json format for configuration contents, add more content formats support by @stardemo in #4126
  • fix(contrib/drivers/mssql): support pagination for both older 2008 and newer 2012 mssql version by @gqcn in #4043
  • fix(contrib/drivers/pgsql): add unix socket connection support by @gqcn in #4028
  • fix(contrib/drivers/pgsql): incompatible placeholder replacement with old version by @gqcn in #4036
  • fix(contrib/registry/consul): update dependence of gf to v2.8.2 with relative path specified by @gqcn in #4029
  • fix(contrib/registry/etcd): remove default configuration of AutoSyncInterval by @gqcn in #4027
  • fix(database/gdb): CRUD typos by @huty1998 in #4017
  • fix(database/gdb): gdb.Counter not work in OnDuplicate by @cyjaysong in #4073
  • fix(database/gdb): add compatibility for old configiration with both Type and part of Link configurations by @gqcn in #4058
  • fix(database/gdb): fix context canceled error in transaction due to usage of TransTimeout configuration by @gqcn in #4037
  • fix(database/gdb): incompatitable statement like Order("id", "dasc") by @gqcn in #3949
  • fix(database/gdb): issue where the Count/Value/Array query logic was incompatible with the old version when users extended the returned result fields using the Select Hook by @gqcn in #3995
  • fix(database/gdb): move Raw parameter from args to sql statement before committed to db driver by @gqcn in #3997
  • fix(database/gdb): orm tag from embedded struct is missing in with feature by @gqcn in #4011
  • fix(database/gdb): recognize tinyint(1)/int(1) as bool by @gqcn in #3943
  • fix(database/gdb): regular expression pattern for link configuration to be compitable with tidbcloud by @robotism in #4064
  • fix(net/gclient): remove default discovery for gclient when Discovery feature enabled by @gqcn in #4174
  • fix(net/ghttp): BufferWriter.Flush writes additional information after custom response wrote by @wlynxg in #4116
  • fix(net/ghttp): MakeBodyRepeatableRead takes not effective when called after ParseForm by @cyjaysong in #4143
  • fix(net/ghttp): MiddlewareHandlerResponse writes additional information after custom response wrote by @wlynxg in #4109
  • fix(net/ghttp): invalid CORS AllowOrigin parsing from referer by @y1jiong in #3990
  • fix(net/ghttp): json omitempty takes no effect in BuildParams, which is not compatible with old version by @gqcn in #4041
  • fix(net/ghttp): nil pointer panic error when server logger set nil by @gqcn in #4055
  • fix(net/ghttp): occasional ci failed by unit testing cases using gctp.GetFreePort by @gqcn in #3982
  • fix(net/ghttp): remove unused code snippet by @ansionfor in #4131
  • fix(net/ghttp): update response message handling in MiddlewareHandlerResponse by @hailaz in #4162
  • fix(net/ghttp):check parameter existence to determine using default or front-end value. by @river291 in #4182
  • fix(net/goai): embedded struct with tags also expand as properties of the parent struct by @wlynxg in #3956
  • fix(os/gcache): function Remove returns value not *gvar.Var as previous version by @y1jiong in #3936
  • fix(os/gview): search file faild from resource manager of package gres by @ynwcel in #4024
  • fix(registry/zookeeper): watch service name path error with extra suffix - by @cruelchen in #3948
  • fix(util/gpage): html.EscapeString for pagination HTML generation and URL parsing by @houseme in #4079
  • fix(util/gpage): code scanning alert no. 9: Potentially unsafe quoting by @houseme in #3992
  • fix(util/gutil): code scanning alert no. 17: Potentially unsafe quoting by @houseme in #3993
  • fix(util/gvalid): lots of memory consumed when required validation on big binary field by @wln32 in #4097
  • fix(utils/gvalid): missing pkg path for enums pointer by @0x7a7a in #3983
  • fix: securiry update CVE-2024-45338 for package golang.org/x/net by @y1jiong in #4070

Other

  • chore(database/gdb): comment update for function Model.Order by @wingfeng in #3933
  • chore(util/gvalid): using 64 instead of 10 bitsize parameter for function strconv.ParseFloat although it treats 10 as 64 internally by @ansionfor in #4154
  • chore: add example for openapi/swagger authentication by @wangle201210 in #4004
  • chore: fix some function names in comment by @longxiangqiao in #3967
  • chore: improve golangci-lint.yml, upgrade dependencies, and optimize code and comments by @houseme in #4025
  • chore: update FUNDING.yml by @gqcn in #4049
  • ci(gci/import): improve golangci.yml and add gci linter by @houseme in #4010
  • ci: use latest go version for unit testing cases of contribution components by @gqcn in #4062
  • docs(cmd/gen): improve comments for command gen dao by @houseme in #4007
  • test(database/gdb): add more unit testing cases for Raw feature by @gqcn in #3962
  • test(drivers/mssql): add unit testing cases of transaction by @oldme-git in #3818
  • test(net/gipv4): add unit tests by @oldme-git in #4052
  • test(os/gproc): add unit test for os/gproc by @ansionfor in #4140

New Contributors

Full Changelog: v2.8.0...v2.9.0-beta

Don't miss a new gf release

NewReleases is sending notifications on new releases.