v1.10.3
Released on 2026-08-01 - GitHub Release
Highlights
Section titled “Highlights”Bug Fixes
Section titled “Bug Fixes”stringx — FirstN returns empty string for negative n (#5620)
Section titled “stringx — FirstN returns empty string for negative n (#5620)”FirstN iterated runes with a counter that could never equal a negative n, so it silently returned the entire input string instead of an empty one. An early-return guard now makes negative lengths behave predictably:
if n < 0 { return ""}stringx — Substr rejects start > stop to prevent a slice panic (#5616)
Section titled “stringx — Substr rejects start > stop to prevent a slice panic (#5616)”Substr validated start and stop individually against [0, length] but never checked that start <= stop. Calls like Substr("hello", 3, 2) slipped past both guards and panicked on rs[3:2]. start > stop is now treated as an invalid stop position, returning ErrInvalidStopPosition instead of panicking.
mapping — Fixed unmarshaling of pointer-to-slice fields (#5662)
Section titled “mapping — Fixed unmarshaling of pointer-to-slice fields (#5662)”httpx.Parse failed to unmarshal pointer-to-slice fields (e.g. *[]uint64). fillSlice used fieldType.Elem(), which for *[]T resolves to []T instead of T, causing type mismatch errors on JSON arrays such as [9000, 9001]. The field type is now dereferenced before resolving the slice element type.
redis — Fixed circuit breaker tripping under high concurrency (#5654)
Section titled “redis — Fixed circuit breaker tripping under high concurrency (#5654)”The DisableIdentity and Protocol fields are now passed through to go-redis, and MaintNotifications is disabled by default since the CLIENT MAINT_NOTIFICATIONS command is unsupported on open-source Redis. This resolves circuit breaker trips under high concurrency or against incompatible Redis servers.
Performance
Section titled “Performance”collection — Optimized Queue growth strategy (#5704)
Section titled “collection — Optimized Queue growth strategy (#5704)”core/collection.Queue previously grew its backing slice by the initial queue size each time it filled up, resulting in O(n²) total copy work for small initial capacities. The new implementation uses a Go-slice-like growth curve — doubling small queues and easing toward 1.25x growth for larger ones — while preserving FIFO order for wrapped ring buffers, clearing dequeued slots so the GC can reclaim referenced objects, and rejecting non-positive initial capacities.
New Features
Section titled “New Features”redis — Added XGroupSetID/XGroupSetIDCtx (#5637)
Section titled “redis — Added XGroupSetID/XGroupSetIDCtx (#5637)”New methods update a consumer group’s last-delivered ID on a stream:
lastID, err := client.XGroupSetIDCtx(ctx, "mystream", "mygroup", "$")Dependency Updates
Section titled “Dependency Updates”go-redis/v99.19.0 → 9.21.0mongo-driver/v22.6.0 → 2.8.0pelletier/go-toml/v22.3.1 → 2.4.3
New Contributors
Section titled “New Contributors”- @Vierblatt, @sapirbaruch, @SAY-5, @jeonghyeon-net, @Meppo, @puneetdixit200, @lxffong, @014-code made their first contributions.
Full Changelog: https://github.com/zeromicro/go-zero/compare/v1.10.2…v1.10.3
