Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.
中文简介正在准备中。当前显示原文说明。
Register and retrieve services at runtime using a thread-safe service registry pattern for loose coupling between plugins.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
any back to specific interfacesServices are registered in plugin Init() methods using the registry interface:
// Get a core service
service, ok := ctx.ServiceRegistry.Get(models.ServiceXxx.String()).(ServiceInterface)
if !ok {
return errors.New("service not available")
}
// Register your plugin's service
ctx.ServiceRegistry.Register(models.ServicePlugin.String(), myService)
Always check the ok flag on type assertions. Store retrieved services in plugin struct for internal use.
See bootstrap.go for implementation.
ok flag on type assertionsmodels.ServiceXxx constants还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
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.
中文简介正在准备中。当前显示原文说明。
Implement HTTP handlers that parse requests, invoke use cases, and format responses following REST conventions.
中文简介正在准备中。当前显示原文说明。
Compact the current conversation into a handoff document for another agent to pick up.
中文简介正在准备中。当前显示原文说明。