在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用go-error-handling
星标30
分支1
更新时间2026年5月7日 19:22
Validates Go error handling patterns
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Validates Go error handling patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Validates Go concurrency patterns
Validates Go context.Context usage patterns
Reviews code for Hexagonal Architecture compliance
Validates Go interface design and abstractions
Performs security review on code changes
Validates Go struct tags for serialization
| name | go-error-handling |
| description | Validates Go error handling patterns |
Errors in Go are values and must always be handled. Ignored errors hide bugs. Unwrapped errors lose context. This skill enforces idiomatic, informative Go error handling.
1. [ ] All errors checked — never `_ = someFunc()` 2. [ ] Errors wrapped with `fmt.Errorf("...: %w", err)` to preserve context 3. [ ] `errors.Is` / `errors.As` used for comparison — never string matching 4. [ ] Errors returned early (fail fast, avoid deeply nested success paths) 5. [ ] Domain errors are sentinel values (`var ErrNotFound = errors.New(...)`) 6. [ ] Exported error variables for callers to compare against 7. [ ] No error swallowing in goroutines 8. [ ] Error messages are lowercase, no trailing punctuation (Go convention) BAD: `result, _ := repo.Find(id)` — error silently discarded BAD: `return fmt.Errorf("failed: %v", err)` — %v loses the error chain GOOD: `return fmt.Errorf("order service find: %w", err)` — %w preserves chain GOOD: `if errors.Is(err, ErrNotFound) { ... }` — type-safe comparison