Documentation
¶
Index ¶
- Constants
- func Error(format string, args ...interface{})
- func FormatGitState(sha, branch string, dirty int) string
- func FormatIssueDeleted(issue *models.Issue) string
- func FormatIssueLong(issue *models.Issue, logs []models.Log, handoff *models.Handoff) string
- func FormatIssueShort(issue *models.Issue) string
- func FormatPoints(points int) string
- func FormatPointsSuffix(points int) string
- func FormatPriority(p models.Priority) string
- func FormatStatus(s models.Status) string
- func FormatTimeAgo(t time.Time) string
- func Info(format string, args ...interface{})
- func JSON(v interface{}) error
- func JSONError(code, message string)
- func JSONErrorWithDetails(code, message string, details map[string]interface{})
- func ShortSHA(sha string) string
- func Success(format string, args ...interface{})
- func Warning(format string, args ...interface{})
- type OutputMode
Constants ¶
const ( ErrCodeNotFound = "not_found" ErrCodeInvalidInput = "invalid_input" ErrCodeConflict = "conflict" ErrCodeCannotSelfApprove = "cannot_self_approve" ErrCodeHandoffRequired = "handoff_required" ErrCodeDatabaseError = "database_error" ErrCodeGitError = "git_error" ErrCodeNoActiveSession = "no_active_session" )
Error codes for structured JSON output
Variables ¶
This section is empty.
Functions ¶
func FormatGitState ¶
FormatGitState formats git state for display
func FormatIssueDeleted ¶
FormatIssueDeleted formats a deleted issue showing [deleted] marker instead of status
func FormatIssueLong ¶
FormatIssueLong formats an issue in long format
func FormatIssueShort ¶
FormatIssueShort formats an issue in short format
func FormatPoints ¶
FormatPoints returns empty string if points is 0, otherwise "Npts"
func FormatPointsSuffix ¶
FormatPointsSuffix returns " Npts" if points > 0, empty string otherwise Useful for appending to format strings
func FormatPriority ¶
FormatPriority formats a priority
func FormatStatus ¶
FormatStatus formats a status with color
func FormatTimeAgo ¶
FormatTimeAgo formats a time as a human-readable "ago" string
func JSONErrorWithDetails ¶
JSONErrorWithDetails outputs an error as JSON with additional context
Types ¶
type OutputMode ¶
type OutputMode int
OutputMode determines output format
const ( ModeShort OutputMode = iota ModeLong ModeJSON )