---
title: "v2.10.1 2026-05-14"
url: "https://goframe.org/release/v2.10.1"
markdown_url: "https://goframe.org/release/v2.10.1.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.1 发布说明，新增 i18n 文件自动解码加载、配置 GetEffective 与 SHA512 实现，修复 etcd 注册中心、ORM 与 PgSQL 驱动问题，并大幅扩充 MySQL、MariaDB、PgSQL、GaussDB 驱动的测试覆盖。"
keywords: ["GoFrame", "v2.10.1", "版本发布", "i18n", "GetEffective", "SHA512", "etcd", "PgSQL", "bytea", "测试覆盖", "问题修复"]
---

# v2.10.1 2026-05-14

## GoFrame v2.10.1 发布：i18n 文件自动加载、配置 GetEffective、SHA512 与数据库修复

`GoFrame v2.10.1` 已发布。本版本新增 `i18n` 文件自动解码加载、配置 `GetEffective` 方法与 `SHA512` 哈希实现，修复 `etcd` 注册中心、`ORM` 与 `PgSQL` 驱动的多项问题，并对 `MySQL`、`MariaDB`、`PgSQL`、`GaussDB` 驱动进行了大规模测试覆盖扩充。

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

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

---

## 新功能

### 国际化 `i18n/gi18n`

- 根据文件扩展名自动检测并解码加载 `i18n` 文件内容。[#4662](https://github.com/gogf/gf/pull/4662)（@The-night-elves）

### 配置 `os/gcfg`

- 新增 `GetEffective` 方法，按标准配置优先级取值。[#4673](https://github.com/gogf/gf/pull/4673)（@lingcoder）

### 加密 `gcrypto/gsha512`

- 新增 `SHA512` 哈希实现。[#4667](https://github.com/gogf/gf/pull/4667)（@yuluo-yx）

### CLI `cmd/gf`

- `gen dao` 新增 `fileNameCase` 配置及 AI 编码相关内容。[#4764](https://github.com/gogf/gf/pull/4764)（@gqcn）

---

## 问题修复

### 注册中心 `contrib/registry`

- `etcd`：`etcd.NewWithClient()` 不再缺少 `DialTimeout`。[#4670](https://github.com/gogf/gf/pull/4670)（@shengdoushi）
- `etcd`：客户端上下文结束后 `doKeepAlive` 不再无法退出。[#4669](https://github.com/gogf/gf/pull/4669)（@yuluo-yx）

### ORM `database/gdb`

- `Fields()` 优雅处理空字符串。[#4700](https://github.com/gogf/gf/pull/4700)（@lingcoder）
- 将负数 `Limit` / `Page` / `Offset` 视为 `0`。[#4702](https://github.com/gogf/gf/pull/4702)（@lingcoder）
- `AllAndCount` / `ScanAndCount` 在字段数大于 1 时，即使 `useFieldForCount` 为真也使用 `COUNT(1)`。[#4701](https://github.com/gogf/gf/pull/4701)（@lingcoder）
- `Model.TableFields` 中去除 schema 的引号字符。[#4730](https://github.com/gogf/gf/pull/4730)（@lingcoder）

### 其他模块

- `os/gstructs`：在 `TagPriorityName` 中去除 tag 选项，避免字段名污染。[#4681](https://github.com/gogf/gf/pull/4681)（@lingcoder）
- `contrib/drivers/pgsql`：读写时保持 `bytea` 数据完整性。[#4678](https://github.com/gogf/gf/pull/4678)（@lingcoder）
- `contrib/drivers/mysql`：`nodeInvalid` 测试配置改用不可达端口。[#4726](https://github.com/gogf/gf/pull/4726)（@lingcoder）
- WASM 构建时保护 `os.Args` 访问，避免 panic。[#4762](https://github.com/gogf/gf/pull/4762)（@gqcn）

---

## 代码重构与杂项

- 清理 `Makefile`，移除不必要的脚本。[#4684](https://github.com/gogf/gf/pull/4684)（@gqcn）
- `README` 新增 `DeepWiki` 徽章。[#4661](https://github.com/gogf/gf/pull/4661)（@hailaz）

## 测试

- `gaussdb`：新增 builder、子查询、Join、结构体测试。[#4688](https://github.com/gogf/gf/pull/4688)；新增 union、DO、原生 where 测试。[#4687](https://github.com/gogf/gf/pull/4687)；新增事务、where、hook、ctx 测试。[#4685](https://github.com/gogf/gf/pull/4685)；新增 soft time、with、scanlist、union、do 测试。[#4686](https://github.com/gogf/gf/pull/4686)（@lingcoder）
- `pgsql`：新增 `Builder`/`Subquery`/`Join`/`Struct` 测试。[#4680](https://github.com/gogf/gf/pull/4680)；新增 `Union`/`DO`/原生 Where 测试。[#4679](https://github.com/gogf/gf/pull/4679)；新增事务、where、hook、ctx 测试。[#4675](https://github.com/gogf/gf/pull/4675)；新增 `SoftTime`/`With`/`ScanList` 测试。[#4676](https://github.com/gogf/gf/pull/4676)（@lingcoder）
- `mysql`：新增 `Lock`/`Omit`/`Cache`/`Batch` 测试。[#4706](https://github.com/gogf/gf/pull/4706)；新增并发/Hook/Ctx 测试。[#4708](https://github.com/gogf/gf/pull/4708)；新增 MySQL 特有功能测试。[#4709](https://github.com/gogf/gf/pull/4709)；增强复杂查询测试。[#4707](https://github.com/gogf/gf/pull/4707)；增强数据类型测试。[#4705](https://github.com/gogf/gf/pull/4705)；增强事务测试。[#4704](https://github.com/gogf/gf/pull/4704)；新增分页与错误处理测试。[#4703](https://github.com/gogf/gf/pull/4703)（@lingcoder）
- `mariadb`：新增分页、错误、并发、原始类型与分库分表测试。[#4723](https://github.com/gogf/gf/pull/4723)；新增 builder、struct、join、batch、cache、omit 测试。[#4722](https://github.com/gogf/gf/pull/4722)；新增 softtime、with、scanlist、union、do 测试。[#4721](https://github.com/gogf/gf/pull/4721)；新增事务、where、hook、ctx 测试。[#4720](https://github.com/gogf/gf/pull/4720)；新增基础设施、核心与 model 测试。[#4719](https://github.com/gogf/gf/pull/4719)；新增三层特性与 issue 回归测试。[#4724](https://github.com/gogf/gf/pull/4724)（@lingcoder）

---

## 新贡献者

感谢 [@shengdoushi](https://github.com/shengdoushi) 首次向 `GoFrame` 提交代码（[#4670](https://github.com/gogf/gf/pull/4670)）。

也感谢本版本其他修复与功能的作者：@The-night-elves、@lingcoder、@yuluo-yx、@gqcn、@hailaz。

---

## 升级建议

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

`CLI` 请同步升到对应版本。若你用到以下能力，建议优先验证：

- `i18n` 文件加载、`os/gcfg` 的 `GetEffective`
- `gcrypto/gsha512` 哈希
- `etcd` 注册中心
- `ORM` 的 `Fields()`、`Limit`/`Page`/`Offset`、`AllAndCount`/`ScanAndCount`
- `PgSQL` 的 `bytea` 读写

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

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