goframe-v2
Installation
SKILL.md
Critical Conventions
Project Development Standards
- For complete projects (HTTP/microservices), install GoFrame CLI and use
gf initto create project scaffolding. See Project Creation - init for details. - Auto-generated code files (dao, do, entity) MUST NOT be manually created or modified per GoFrame conventions.
- Unless explicitly requested, do NOT use the
logic/directory for business logic. Implement business logic directly in theservice/directory. - Reference complete project examples:
- HTTP service best practice: user-http-service
- gRPC service best practice: user-grpc-service
Component Usage Standards
- Before creating new methods or variables, check if they already exist elsewhere and reuse existing implementations.
- Use the
gerrorcomponent for all error handling to ensure complete stack traces for traceability. - When exploring new components, prioritize GoFrame built-in components and reference best practice code from examples.
- Database Operations MUST use DO objects (
internal/model/do/), neverg.Mapormap[string]interface{}. DO struct fields areinterface{}; unset fields remainniland are automatically ignored by the ORM:// Good - use DO object dao.Users.Ctx(ctx).Where(cols.Id, id).Data(do.User{Uid: uid}).Update()