Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。

## [1.0.2] - 2026-03-17

### 修复 (Fixed)
- **vd** - 修复 `sort` 规则,支持嵌套字段格式(如 `field.subfield:1`)

## [1.0.1] - 2026-01-16

### 新增功能 (Added)
Expand Down Expand Up @@ -122,5 +127,6 @@
- **Fixed**: 问题修复
- **Security**: 安全性相关的修复

[1.0.2]: https://github.com/kainonly/go/releases/tag/v1.0.2
[1.0.1]: https://github.com/kainonly/go/releases/tag/v1.0.1
[1.0.0]: https://github.com/kainonly/go/releases/tag/v1.0.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func main() {

| Rule | Tag | Description |
|------|-----|------|
| `Sort()` | `sort` | Sort format: `field:1` or `field:-1` |
| `Sort()` | `sort` | Sort format: `field:1`, `field:-1`, or `field.sub:1` |
| `Username()` | `username` | Username (3-20 chars) |
| `Slug()` | `slug` | URL slug |
| `ObjectID()` | `objectid` | MongoDB ObjectId |
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func main() {

| 规则 | Tag | 描述 |
|------|-----|------|
| `Sort()` | `sort` | 排序格式 `field:1` 或 `field:-1` |
| `Sort()` | `sort` | 排序格式 `field:1`、`field:-1` 或 `field.sub:1` |
| `Username()` | `username` | 用户名 (3-20字符) |
| `Slug()` | `slug` | URL slug |
| `ObjectID()` | `objectid` | MongoDB ObjectId |
Expand Down
13 changes: 13 additions & 0 deletions docs/releases/v1.0.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# v1.0.2 Release Notes

**Release Date:** 2026-03-17

## Bug Fixes
Comment on lines +1 to +5

- **vd**: Fixed `sort` rule regex to support nested field notation (e.g., `field.subfield:1`)

## Upgrade

```bash
go get github.com/kainonly/go@v1.0.2
```
Comment on lines +9 to +13
Loading