Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.
中文简介正在准备中。当前显示原文说明。
Implement HTTP handlers that parse requests, invoke use cases, and format responses following REST conventions.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
constants/errors.go.Handlers are the HTTP boundary:
RegisterHandler needing both UserService and EmailService should delegate to a RegisterUseCase that imports both interfaces, keeping the handler thin and focused on HTTP concerns.Handle method with http.HandlerFunc type.Validate() method on request structs to clean up input but do not trim sensitive fields like passwords, tokens, etc. Before trimming fields on the request struct, check that pointer fields are not nil to avoid dereferencing nil pointers. For example, if you have a request struct with a pointer field like Email *string, you should check if Email is not nil before calling strings.TrimSpace() on it within the Validate() method. This ensures that you don't encounter a runtime panic due to dereferencing a nil pointer.reqCtx.SetJSONResponse.internal/ folder as there are utilities for request parsing, response formatting, and error handling. Avoid reinventing the wheel by utilising these utilities to ensure consistency across handlers.See examples/todo_handlers.go for:
reqCtx.SetJSONResponse for consistent response formatting or not using it to return the response at all, which can lead to inconsistent responses and missing status codes. Always use reqCtx.SetJSONResponse to ensure that responses are consistently formatted and include the appropriate status codes.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.
中文简介正在准备中。当前显示原文说明。
Use this skill when answering questions, explaining concepts, writing technical responses, reviewing code, or helping with development tasks. Communicate in clear, simple, standard English. Keep answers concise and focused, remove unnecessary filler and repetition, explain technical ideas in plain language, and structure information so it is easy to read and understand. When showing code, present it clearly with enough context for the developer to understand what it does and where it belongs.
中文简介正在准备中。当前显示原文说明。
A relentless interview to sharpen a plan or design.
中文简介正在准备中。当前显示原文说明。
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
中文简介正在准备中。当前显示原文说明。
Compact the current conversation into a handoff document for another agent to pick up.
中文简介正在准备中。当前显示原文说明。
Build pluggable authentication features using the plugin system with initialization, migrations, routes, and service registration.
中文简介正在准备中。当前显示原文说明。