service.xpcool.com/api/open/v1/tools/doc.go
夏犀麟 82b1ad2b5c refactor(api): 公共接口改名 open 并重构契约层为 tools/<子功能>/index.go
- api/common/v1 → api/open/v1,路由前缀 /api/common/v1 → /api/open/v1
- 契约层按子功能拆目录:api/open/v1/tools/{uuid,md5,random,time,ip}/index.go
- 控制器同步拆文件:internal/controller/open/{uuid,md5,random,time,ip}.go
- 命名规则(open 优于 common)与 tools 目录规则记入 AGENTS.md
- 冒烟测试:旧路由 404,新路由 5 端点全部通过
2026-08-24 18:03:30 +08:00

15 lines
677 B
Go

// Package tools hosts the open API tool endpoints (GET/POST /tools/*).
//
// Naming rule: every sub-feature gets its own directory under tools/, and the
// Req/Res contracts live in an index.go inside that directory, e.g.
//
// api/open/v1/tools/uuid/index.go - GET /tools/uuid
// api/open/v1/tools/md5/index.go - POST /tools/md5
// api/open/v1/tools/random/index.go - GET /tools/random
// api/open/v1/tools/time/index.go - GET /tools/time
// api/open/v1/tools/ip/index.go - GET /tools/ip
//
// Add a new feature by creating tools/<name>/index.go and a matching method
// in internal/controller/open/<name>.go; the router binds it automatically.
package tools