Documentation
¶
Index ¶
Constants ¶
const ( SeverityInfo = "info" SeverityWarning = "warning" SeverityError = "error" )
Finding severities are deliberately separate from lifecycle or check status.
const ReportVersion = 1
ReportVersion is the version of the machine-readable CLI result contracts. Individual reports may evolve independently, but all current reports use version one.
Variables ¶
var ErrNotARepo = vcs.ErrNotARepo
ErrNotARepo is returned when the current directory is not inside a repository wtf can manage.
var Version = "0.11.1"
Version is set at build time via ldflags.
Functions ¶
func FormatError ¶
FormatError returns a user-friendly, WTF-themed error string.
func IsJSONOutput ¶ added in v0.4.0
func IsJSONOutput() bool
IsJSONOutput reports whether the global --json flag was set.
Types ¶
type CleanupPlan ¶ added in v0.9.0
type CleanupPlan struct {
Version int `json:"version"`
PlanID string `json:"plan_id"`
Workspace identity.Workspace `json:"workspace"`
Repository identity.Repository `json:"repository"`
Observed *vcs.Worktree `json:"observed,omitempty"`
Preconditions []string `json:"preconditions"`
Actions []string `json:"actions"`
Risks []string `json:"risks"`
}
CleanupPlan is the deliberately small, serializable contract for destructive workspace cleanup. It contains a snapshot, not an instruction to discover a workspace again at apply time.
type Finding ¶ added in v0.11.0
type Finding struct {
Code string `json:"code"`
Severity string `json:"severity"`
RepositoryID string `json:"repository_id"`
WorkspaceID string `json:"workspace_id"`
Message string `json:"message"`
RepairCommand string `json:"repair_command,omitempty"`
}
Finding is the shared diagnostic shape used by doctor and resource reports. IDs are always durable WTF UUIDs; callers must not substitute paths or names.