goctl/v1.9.2
-
Swagger Improvements:
-
Other Fixes:
- Fix: issue #5154, not using SSE template files #5220 (@kevwan)
Full Changelog: tools/goctl/v1.9.1...tools/goctl/v1.9.2
v1.9.2
This release is solely focused on addressing a critical problem related to the go-redis dependency. Previous versions of go-redis were retracted, which could cause build failures, dependency resolution issues, or unexpected behavior for downstream projects relying on stable releases.
- go-redis Version Issue: The only change in this release is updating go-redis to circumvent the retracted versions. This ensures that consumers of this library can continue to build and use it reliably without encountering problems from retracted dependencies.
- No Functional Changes: There are no new features, bug fixes, or breaking changes in this release. Functionality remains the same as the previous version.
- Dependency Stability: Users should upgrade to this release if they are experiencing issues related to go-redis retractions or want to ensure their dependency tree remains stable.
While this release only addresses the go-redis issue, we'd like to acknowledge recent first-time contributors to the project:
For a full list of changes between v1.9.1 and v1.9.2, see the changelog.
Upgrade Recommendation:
If you depend on redis, it is strongly recommended to upgrade to this release to avoid issues caused by the retracted versions.
goctl/v1.9.1
- Code generation ergonomics:
- Add code generation headers to safe-to-edit files for clearer ownership and customization boundaries.
- Fix array type generation issues to ensure accurate code output.
- API developer experience:
- Add complete test scaffolding for API projects via the
--testflag.
- Add complete test scaffolding for API projects via the
- Swagger/OpenAPI correctness:
- Correct
$refplacement in array definitions whenuseDefinitionsis enabled.
- Correct
- Stability and optimizations:
- Fix SSE handler blocking.
- Optimize slice lookups and
Unquoteutility function performance.
- Add code generation headers in safe-to-edit files to clarify which files are intended for user modifications while keeping generated segments intact.
PR: feat: add code generation headers in safe to edit files by @kevwan (@5136) - Fix array type generation error to produce correct types in generated code.
PR: fix array type generation error by @kesonan (@5142)
- Add complete test scaffolding support for API projects using the
--testflag, enabling quicker setup of testable services.
PR: Add complete test scaffolding support with --test flag for API projects by @Copilot (@5176)
- Fix
$refplacement in array definitions whenuseDefinitionsis enabled to align with the OpenAPI/Swagger schema expectations.
PR: fix(goctl/swagger): correct $ref placement in array definitions when useDefinitions is enabled by @Copilot (@5199)
- Fix SSE handler blocking behavior that could stall event delivery under certain conditions.
PR: fix: SSE handler blocking by @wuqinqiang (@5181)
- Optimize slice find routines and the
Unquotefunction for better runtime efficiency.
PR: update: optimize slice find and Unquote func by @me-cs (@5108)
- Swagger regeneration: If you rely on
useDefinitions, regenerate your Swagger/OpenAPI specs to pick up the corrected$refplacement. - Codegen headers: Newly generated safe-to-edit files will include headers clarifying edit expectations; no action required, but helpful for code review and maintenance.
- Thanks to all contributors in this release: @kevwan, @kesonan, @me-cs, @wuqinqiang, and first-time contributor @Copilot. Your improvements enhance correctness, stability, and developer productivity for goctl users.
v1.9.1
- Logging enhancements:
- Customize log key names to fit your log schema and downstream tooling.
- Prefer
json.Marshaleroverfmt.Stringerwhen emitting JSON logs, improving correctness and structure.
- REST/SSE stability and operability:
- Fix SSE handler blocking and reduce noisy logs by downgrading
SetWriteDeadlineerrors to debug. - Add
SetSSESlowThresholdto help detect slow clients and long writes.
- Fix SSE handler blocking and reduce noisy logs by downgrading
- Diagnostics and performance:
- Improved mapreduce panic stacktraces for faster root-cause analysis.
- Optimized machine performance data reading to reduce runtime overhead.
- Support customizing log keys so you can align emitted fields (e.g., time, level, caller, message) to your organization’s conventions or ingestion pipeline requirements.
PR: feat: support customize of log keys by @WqyJh (@5103) - Prefer
json.Marshaleroverfmt.Stringerwhen generating JSON logs, ensuring structured fields are serialized using their explicit JSON representations rather than ad-hoc strings.
PR: feat: prefer json.Marshaler over fmt.Stringer for JSON log output by @WqyJh (@5117)
- Fix SSE handler blocking behavior that could stall responses under certain conditions.
PR: fix: SSE handler blocking by @wuqinqiang (@5181) - Reduce log noise for transient I/O conditions by downgrading
SetWriteDeadlineerrors to debug level in REST SSE.
PR: fix(rest): change SSE SetWriteDeadline error log to debug level by @wuqinqiang (@5162) - Add
sseSlowThresholdto surface slow SSE writes, enabling better observability about backpressure or slow clients.
PR: feat(handler): add sseSlowThreshold by @wuqinqiang (@5196)
- Improve panic stacktrace reporting in mapreduce, making error contexts clearer and debugging faster.
PR: optimize: mapreduce panic stacktrace by @kevwan (@5168)
- Optimize machine performance data reading to lower collection overhead and reduce runtime impact.
PR: opt: optimization of machine performance data reading by @wanwusangzhi (@5174)
- Fix gRPC → HTTP mapping issue in gateway.
PR: fix: issue-5110 by @guonaihong (@5113)
- Logging key customization:
- If you rely on specific field names in log pipelines, consider setting the new custom key configuration to preserve schema consistency.
- JSON log output:
- If your types implement
json.Marshaler, expect more accurate JSON in logs. If you previously depended on stringified representations, review downstream consumers to ensure compatibility.
- If your types implement
- SSE tuning:
- Consider using
SetSSESlowThresholdto flag slow clients or network conditions in environments sensitive to latency. - The
SetWriteDeadlinelog level change reduces noise; adjust logger settings if you still want to surface these events.
- Consider using
- Thanks to all contributors in this release: @WqyJh, @guonaihong, @wanwusangzhi, @kevwan, @wuqinqiang, and first-time contributor @Copilot. Your work improves performance, reliability, and developer ergonomics for everyone using go-zero.
goctl/v1.9.0
- fear: add uuid:varchar to p2m by @hoshi200 in https://github.com/zeromicro/go-zero/pull/5022
- feat: support sse in api files by @kevwan in https://github.com/zeromicro/go-zero/pull/5074
- feat: supported sse generation by @kesonan in https://github.com/zeromicro/go-zero/pull/5082
- feat: Support projectPkg template variables in config, handler, logic, main, and svc template files by @geekeryy in https://github.com/zeromicro/go-zero/pull/4939
- feat: support goctl --module to set go module by @kevwan in https://github.com/zeromicro/go-zero/pull/5135
- @charmfocus made their first contribution in https://github.com/zeromicro/go-zero/pull/5010
- @csbzy made their first contribution in https://github.com/zeromicro/go-zero/pull/5024
- @DengY11 made their first contribution in https://github.com/zeromicro/go-zero/pull/5035
- @queryfast made their first contribution in https://github.com/zeromicro/go-zero/pull/5051
- @sunhao1296 made their first contribution in https://github.com/zeromicro/go-zero/pull/5065
- @ipinak made their first contribution in https://github.com/zeromicro/go-zero/pull/5029
Full Changelog: https://github.com/zeromicro/go-zero/compare/tools/goctl/v1.8.5...tools/goctl/v1.9.0
goctl/v1.9.0-alpha
- fear: add uuid:varchar to p2m by @hoshi200 in https://github.com/zeromicro/go-zero/pull/5022
- feat: support sse in api files by @kevwan in https://github.com/zeromicro/go-zero/pull/5074
- feat: supported sse generation by @kesonan in https://github.com/zeromicro/go-zero/pull/5082
- @charmfocus made their first contribution in https://github.com/zeromicro/go-zero/pull/5010
- @csbzy made their first contribution in https://github.com/zeromicro/go-zero/pull/5024
- @DengY11 made their first contribution in https://github.com/zeromicro/go-zero/pull/5035
- @queryfast made their first contribution in https://github.com/zeromicro/go-zero/pull/5051
- @sunhao1296 made their first contribution in https://github.com/zeromicro/go-zero/pull/5065
- @ipinak made their first contribution in https://github.com/zeromicro/go-zero/pull/5029
Full Changelog: https://github.com/zeromicro/go-zero/compare/tools/goctl/v1.8.5...tools/goctl/v1.9.0-alpha
v1.9.0
- feat: support masking sensitive data in logx by @kevwan in #5003
- feat: add field tag (
-) skip logic inunwrapFieldsin sqlx by @charmfocus in #5010 - feat: upgrade to mongo-driver v2, and move v1 to
zero-contribby @me-cs in #4687 - feat: add generic TypedSet with 2x performance boost and compile-time by @codeErrorSleep in #4888
- feat: add custom middleware support with onion model in gateway by @DengY11 in #5035
- feat: redis support consumer groups by @jk2K in #4912
- feat: ignore unknown fields in gateway request parsing by @guonaihong in #5058
- fix: issue with etcd key disappearing and unable to auto-re-register by @guonaihong in #4960
- fix: SSE timeout will affected by http.Server's WriteTimeout by @csbzy in #5024
- fix: unmarshal problem on env vars for type env string by @kevwan in #5037
- fix: large memory usage on detail logging post requests by @kevwan in #5039
- fix: Resolve HTML escaping issue during JSON serialization in httpx by @Disdjj in #5032
- fix: resolve concurrent get may lead to empty result in ImmutableResource by @sunhao1296 in #5065
- optimize: logging with fields by @kevwan in #5066
- @Twilikiss made their first contribution in #4997
- @charmfocus made their first contribution in #5010
- @csbzy made their first contribution in #5024
- @DengY11 made their first contribution in #5035
- @queryfast made their first contribution in #5051
- @sunhao1296 made their first contribution in #5065
- @ipinak made their first contribution in #5029
Detailed Release Notes: https://go-zero.dev/en/reference/releases/v1.9.0 Full Changelog: https://github.com/zeromicro/go-zero/compare/v1.8.5...v1.9.0
goctl/v1.8.5
- Bug Fix: Fix for issue #4943 — fix goctl api swagger error (@kesonan)
- Bug Fix: Fixed goctl api swagger panic with nil pointer when there is a wrong field tag in the API file (#4936)
- Bug Fix: Resolved issue where
timeout: 0swas not working in API files (#4932, @kevwan) - Bug Fix: Corrected PostgreSQL
numerictype mapping in goctl model generation (#4992, @AnlynnLee) - Enhancement: Improved POST JSON parameter determination logic in goctl API Swagger and added unit tests (#4997, @Twilikiss)
- @wanwusangzhi made their first contribution (#4944)
- @geekeryy made their first contribution (#4979)
- @Twilikiss made their first contribution (#4997)
Full Changelog: tools/goctl/v1.8.4...tools/goctl/v1.8.5
v1.8.5
- SQL Read/Write Splitting: Introduced SQL read/write splitting for improved database performance and scalability (#4976, #4990, #5000).
- Serverless Support in REST: Added support for serverless use in REST services (#5001).
- Fixed HTTP SSE method timeout not working when timeout is set by server (#4932)
- Fixed timeout
0snot working in API files (#4932) - Fixed panic caused by
time.Durationtype with numerical values (#4944) - Fixed duration type comparison in environment variable processing (#4979)
Full Changelog: v1.8.4...v1.8.5
goctl/v1.8.4
- goctl 1.8.4 Features & Beta: New features and improvements in goctl, including mongo model generation with cache prefix and improved swagger consume types (#4849, #4869, #4903, #4907).
- Bug Fixes & Compatibility: Multiple bug fixes for backward compatibility, timeout settings, spelling, type handling, and more (#4852, #4895, #4914, #4916, #4917, #4918, #4920, #4785, #4931).
- goctl features of 1.8.4-alpha by @kesonan in #4849
- goctl: v1.8.4-beta by @kesonan in #4890
- fix(goctl): Fix getting swagger consume types by @jaronnie in #4903
- feat(goctl): generate mongo model with cache prefix by @smiley-yoyo in #4907
- @yguilai made their first contribution in #4874
- @Caplost made their first contribution in #4917
- @smiley-yoyo made their first contribution in #4907
Full Changelog: https://github.com/zeromicro/go-zero/compare/tools/goctl/v1.8.3...tools/goctl/v1.8.4