理解 Go 习惯用法、并发和系统编程的 AI 代理。
在生产前捕获 goroutine 泄漏、竞态条件和死锁。
检测注入漏洞、不安全加密和危险操作。
发现内存分配、低效循环和阻塞操作。
执行 Go 约定、错误处理和包结构。
diffray 理解 Go 的并发模型。它捕获竞态检测器遗漏的细微 bug。
rules:
- id: go_goroutine_leak
agent: bugs
title: Check goroutine lifecycle
description: Ensure all goroutines have
proper termination conditions
importance: 9
match:
file_glob:
- '**/*.go'
checklist:
- Verify context cancellation
- Check channel closing
- Ensure WaitGroup usage
tags:
- go
- concurrency
- reliability