---
title: "v2.10.5 2026-11-20"
url: "https://goframe.org/release/v2.10.5"
markdown_url: "https://goframe.org/release/v2.10.5.md"
locale: "zh-Hans"
version: "2.10.x(Latest)"
section: "版本发布记录"
category: "版本发布记录 / v2.10.x"
published: "2026-11-20"
updated: "2026-11-20"
description: "GoFrame v2.10.5 发布说明，升级 OpenTelemetry 至 v1.45.0 与 Go 1.25，新增 slog 转发处理器，修复 ghttp、gdb、gconv、glog、gstr、gtime、gcache、gsession、gtree 等模块问题，并带来 ORM 批量扫描与 gconv 性能优化。"
keywords: ["GoFrame", "v2.10.5", "版本发布", "OpenTelemetry", "slog", "Go 1.25", "loong64", "glog", "gdb", "ghttp", "gconv", "问题修复", "性能优化"]
---

# v2.10.5 2026-11-20

## GoFrame v2.10.5 发布：升级 Go 1.25 与 OpenTelemetry v1.45，新增 slog 处理器，修复 ghttp、gdb、gconv 等模块并优化 ORM 批量扫描

`GoFrame v2.10.5` 已发布。本版本升级 `OpenTelemetry` 至 `v1.45.0`、`Go` 至 `1.25`，新增 `slog` 转发到 `glog` 的处理器，并修复 `net/ghttp`、`database/gdb`、`util/gconv`、`os/glog`、`text/gstr`、`os/gtime`、`os/gcache`、`os/gsession`、`container/gtree` 等多个模块的问题，同时带来 `ORM` 关联批量扫描与 `gconv` 的性能优化。

完整变更：[https://github.com/gogf/gf/releases/tag/v2.10.5](https://github.com/gogf/gf/releases/tag/v2.10.5)

代码差异：[https://github.com/gogf/gf/compare/v2.10.4...v2.10.5](https://github.com/gogf/gf/compare/v2.10.4...v2.10.5)

---

## 新功能

### 依赖升级

- 升级 `OpenTelemetry` 至 `v1.45.0`，`Go` 至 `1.25`。[#4863](https://github.com/gogf/gf/pull/4863)（@houseme）

### 日志 `os/glog`

- 新增 `slog handler`，可将标准库 `slog` 日志转发到 `glog`。[#4986](https://github.com/gogf/gf/pull/4986)（@LanceAdd）

---

## 问题修复

### HTTP 服务 `net/ghttp`

- 错误请求耗时按秒记录，与访问日志保持一致。[#4933](https://github.com/gogf/gf/pull/4933)（@LuisFigueroaG）
- 过滤后的 query map 中保留 body 值。[#4909](https://github.com/gogf/gf/pull/4909)（@allenflux）
- 已提交响应跳过 `gzip`。[#4960](https://github.com/gogf/gf/pull/4960)（@LanceAdd）
- 修正文件下载响应头。[#4988](https://github.com/gogf/gf/pull/4988)（@LanceAdd）

### ORM `database/gdb`

- `MySQL` 连接参数 `time_zone` 不再覆盖 `Timezone` 配置。[#4937](https://github.com/gogf/gf/pull/4937)（@ShryukGrandhi）
- `Join` 语句支持 `FieldsEx` 与 `FieldsExPrefix`。[#4939](https://github.com/gogf/gf/pull/4939)（@ShryukGrandhi）
- 记录扫描进 map 切片而非空 map。[#4955](https://github.com/gogf/gf/pull/4955)（@LuisFigueroaG）
- 在上下文事务中运行的查询禁用 model 缓存。[#4964](https://github.com/gogf/gf/pull/4964)（@ShryukGrandhi）

### 系统相关 `os`

- `os`：停止累积 `inotify` 监听器。[#4944](https://github.com/gogf/gf/pull/4944)（@LanceAdd）
- `os/gres`：打包时对虚拟目录条目使用斜杠分隔符。[#4936](https://github.com/gogf/gf/pull/4936)（@ShryukGrandhi）
- `os/gproc`：在 Windows 上跳过仅 Unix 的 pid 映射目录。[#4956](https://github.com/gogf/gf/pull/4956)（@b84330808）
- `os/gfile`：`MatchGlob` 的 globstar 匹配在 Windows 上保持分隔符感知。[#4961](https://github.com/gogf/gf/pull/4961)（@b84330808）
- `os/gcache`：未命中的查询不进入内存 `LRU`。[#4968](https://github.com/gogf/gf/pull/4968)（@waw666waw666）
- `os/gsession`：仅被读取的 `RedisHashTable` 会话也刷新 `TTL`。[#4975](https://github.com/gogf/gf/pull/4975)（@waw666waw666）
- `os/gtime`：`ParseDuration` 支持小数与天数上的加号。[#4974](https://github.com/gogf/gf/pull/4974)（@Kernel-Hunter）

### CLI `cmd/gf`

- `gen dao`：设置 `removeFieldPrefix` 时在 do struct 中保留 `orm` 标签。[#4952](https://github.com/gogf/gf/pull/4952)（@LuisFigueroaG）
- `gen ctrl`：解析已有控制器时保留 import 别名。[#4940](https://github.com/gogf/gf/pull/4940)（@ShryukGrandhi）；按路径查找 api import。[#4957](https://github.com/gogf/gf/pull/4957)（@nk-batman21）

### 其他模块

- `contrib/drivers/sqlite`：升级 `modernc.org/sqlite` 至 `v1.39.0` 以支持 `loong64`。[#4950](https://github.com/gogf/gf/pull/4950)（@lingcoder）
- `contrib/drivers/gaussdb`：`Save`、`Replace` 的 `MERGE` 占位符按列类型转换。[#4969](https://github.com/gogf/gf/pull/4969)（@lingcoder）
- `util/gconv`：将 `gvar.Var` 包装的切片转换到切片字段。[#4943](https://github.com/gogf/gf/pull/4943)（@nk-batman21）
- `os/glog`：异步 logger 的 `fatal` 日志同步打印。[#4930](https://github.com/gogf/gf/pull/4930)（@LuisFigueroaG）
- `database/gredis`：`ZRange` 的 `start`/`stop` 支持 score 与 lex 边界。[#4959](https://github.com/gogf/gf/pull/4959)（@ShryukGrandhi）
- `container/gtree`：修复 `Iterator*From` 的死锁与忽略停止信号问题。[#4966](https://github.com/gogf/gf/pull/4966)（@waw666waw666）
- `text/gstr`：`PosRune`、`PosIRune`、`PosRRune`、`PosRIRune` 四个函数将双字节字符正确计为一个 rune。[#4973](https://github.com/gogf/gf/pull/4973)（@Kernel-Hunter）；`Soundex` 不再为元音写入 `"0"`。[#4971](https://github.com/gogf/gf/pull/4971)（@Kernel-Hunter）；搜索串为空时 `ReplaceI` 直接返回。[#4972](https://github.com/gogf/gf/pull/4972)（@Kernel-Hunter）

---

## 性能优化

- `database/gdb`：对嵌套 `With` 关联扫描进行批量分块。[#4672](https://github.com/gogf/gf/pull/4672)（@LanceAdd）
- `util/gconv`：`Map` 的结果 map 仅在填充时分配。[#4967](https://github.com/gogf/gf/pull/4967)（@g4lb）

## 代码重构

- `os/gres`：资源管理器改用类型化的 `BKVTree`。[#4949](https://github.com/gogf/gf/pull/4949)（@LanceAdd）
- 容器、`gdb`、网络、`os`、`cmd/gf`、`contrib` 等模块采用更现代的 Go 写法。[#4983](https://github.com/gogf/gf/pull/4983)（@LanceAdd）
- `net/ghttp`、`net/gclient`、`container/garray` 使用现代标准库辅助函数。[#4984](https://github.com/gogf/gf/pull/4984)（@LanceAdd）

## CI 与依赖

- 改进 Go 缓存命中率并支持 `go1.27`。[#4951](https://github.com/gogf/gf/pull/4951)（@hailaz）；按矩阵分组启动服务并分组上报覆盖率。[#4962](https://github.com/gogf/gf/pull/4962)（@hailaz）
- `contrib/nacos`：升级 `nacos-sdk-go/v2` 至 `v2.3.6`。[#4981](https://github.com/gogf/gf/pull/4981)（@lingcoder）
- 依赖：将 `yaml` 迁移至 `go.yaml.in/yaml/v3 v3.0.6`。[#4982](https://github.com/gogf/gf/pull/4982)（@angeiv）

---

## 新贡献者

感谢以下同学首次向 `GoFrame` 提交代码（按首次贡献的 `PR` 排列）：

[@nk-batman21](https://github.com/nk-batman21)（[#4943](https://github.com/gogf/gf/pull/4943)）、[@b84330808](https://github.com/b84330808)（[#4956](https://github.com/gogf/gf/pull/4956)）、[@waw666waw666](https://github.com/waw666waw666)（[#4966](https://github.com/gogf/gf/pull/4966)）、[@g4lb](https://github.com/g4lb)（[#4967](https://github.com/gogf/gf/pull/4967)）、[@Kernel-Hunter](https://github.com/Kernel-Hunter)（[#4973](https://github.com/gogf/gf/pull/4973)）、[@angeiv](https://github.com/angeiv)（[#4982](https://github.com/gogf/gf/pull/4982)）。

也感谢本版本其他修复与功能的作者：@houseme、@LanceAdd、@lingcoder、@LuisFigueroaG、@ShryukGrandhi、@allenflux、@hailaz。

---

## 升级建议

```bash
go get -u github.com/gogf/gf/v2@v2.10.5
```

本版本将最低 `Go` 版本提升至 `1.25` 并升级 `OpenTelemetry`，`CLI` 请同步升到对应版本。若你用到以下能力，建议优先验证：

- `slog` 转发到 `glog`
- `ORM` 关联批量扫描、`Join` 的 `FieldsEx` / `FieldsExPrefix`、`gredis` 范围查询
- 重复 query 过滤、文件下载响应头、`gzip` 行为
- `gstr`、`gtime`、`gtree`、`gcache`、`gsession` 相关逻辑
- `loong64` 下的 `SQLite`

问题与讨论：[https://github.com/gogf/gf/issues](https://github.com/gogf/gf/issues)

欢迎 `Star`、提 `Issue` 和 `PR`。`GoFrame`，让 Go 开发更简单。
