AI SummaryA Cursor rules booster that enforces Go best practices and coding standards for Go projects, including conventions for formatting, error handling, concurrency, and project structure. Ideal for Go developers and teams building Go applications who want consistent code quality and adherence to language idioms.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "greatestworks — Cursor Rules" prompt rules to my project. Repository: https://github.com/phuhao00/greatestworks Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Go项目开发规则 - 遵循Go最佳实践,不使用checkout和reset命令
代码规范
• 遵循Go官方代码规范 • 使用gofmt格式化代码 • 变量命名使用驼峰命名法 • 常量使用大写字母和下划线 • 包名使用小写字母,简短有意义
错误处理
• 始终检查错误返回值 • 使用errors.New()或fmt.Errorf()创建错误 • 避免使用panic,除非是程序启动时的致命错误 • 使用defer进行资源清理
并发编程
• 使用goroutine处理并发任务 • 使用channel进行goroutine间通信 • 避免共享内存,使用通信来共享内存 • 使用sync包进行同步控制
性能优化
• 避免不必要的内存分配 • 使用对象池复用对象 • 合理使用缓存 • 避免在循环中进行重复计算
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts