perf: skill

This commit is contained in:
ryan
2026-07-22 22:31:18 +08:00
parent fae83ab0fa
commit b1f2241d0a
9 changed files with 258 additions and 177 deletions
+4 -2
View File
@@ -8,7 +8,9 @@ import (
"github.com/gin-gonic/gin"
)
// RegisterCustomRootRoutes registers custom business routes that belong to the root path.
// RegisterCustomRootRoutes is a scaffold SAMPLE placeholder for root-path routes
// (webhooks, short links). Prefer semantic paths and/or a dedicated root file;
// do not treat this as the only place for all product APIs. See skill new-api.
func RegisterCustomRootRoutes(_ *gin.Engine) {
// Add custom root routes here
// Sample only — add root-path demos here if needed
}
+3 -1
View File
@@ -9,7 +9,9 @@ import (
"github.com/gin-gonic/gin"
)
// RegisterCustomRoutes registers custom business routes to keep routing clean and stable.
// RegisterCustomRoutes is a scaffold SAMPLE only (demo: GET /api/v1/custom/hello).
// Real product APIs belong in apps/<domain>/ with semantic paths and a dedicated
// Register*Routes file (e.g. channel.go), not piled into this package. See skill new-api.
func RegisterCustomRoutes(apiV1Router *gin.RouterGroup) {
customRouter := apiV1Router.Group("/custom")
{
+2 -1
View File
@@ -16,6 +16,7 @@ func RegisterV1Routes(apiV1Router *gin.RouterGroup, apiGroup *gin.RouterGroup) {
// 2. Admin routes
RegisterAdminRoutes(apiV1Router)
// 3. Register custom business routes
// 3. Product domain routes: RegisterXxxRoutes(apiV1Router) — see skill new-api
// 4. Scaffold sample only (optional demo under /api/v1/custom)
RegisterCustomRoutes(apiV1Router)
}