feat(doctor): add health check framework (gt-f9x.4)
Add doctor package with: - Check interface for implementing health checks - CheckContext for passing context to checks - CheckResult and CheckStatus types - Report with summary and pretty printing - Doctor runner with Run() and Fix() methods - BaseCheck and FixableCheck for easy check implementation - CLI command: gt doctor [--fix] [--verbose] [--rig <name>] Built-in checks will be added in: - gt-f9x.5: Town-level checks (config, state, mail, rigs) - gt-f9x.6: Rig-level checks (refinery, clones, gitignore) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
9
internal/doctor/errors.go
Normal file
9
internal/doctor/errors.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package doctor
|
||||
|
||||
import "errors"
|
||||
|
||||
// Common errors
|
||||
var (
|
||||
// ErrCannotFix is returned when a check does not support auto-fix.
|
||||
ErrCannotFix = errors.New("check does not support auto-fix")
|
||||
)
|
||||
Reference in New Issue
Block a user