output

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package output provides output renderers for the doctor command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONOutput

type JSONOutput struct {
	Results []JSONResult `json:"results"`
	Summary JSONSummary  `json:"summary"`
}

JSONOutput represents the JSON output structure.

type JSONRenderer

type JSONRenderer struct{}

JSONRenderer renders check results as JSON.

func (*JSONRenderer) Render

func (r *JSONRenderer) Render(summary checks.Summary) (string, error)

Render renders all results as JSON.

type JSONResult

type JSONResult struct {
	Name      string `json:"name"`
	Status    string `json:"status"`
	Message   string `json:"message"`
	Details   string `json:"details,omitempty"`
	Fixable   bool   `json:"fixable,omitempty"`
	FixAction string `json:"fixAction,omitempty"`
}

JSONResult represents a single check result in JSON format.

type JSONSummary

type JSONSummary struct {
	Passed   int `json:"passed"`
	Warnings int `json:"warnings"`
	Failed   int `json:"failed"`
	Skipped  int `json:"skipped"`
}

JSONSummary represents the summary in JSON format.

type TUIRenderer

type TUIRenderer struct{}

TUIRenderer renders check results to the terminal with styling.

func (*TUIRenderer) RenderFixHint

func (r *TUIRenderer) RenderFixHint(hasFixable bool) string

RenderFixHint renders a hint about --fix flag.

func (*TUIRenderer) RenderResult

func (r *TUIRenderer) RenderResult(result checks.Result) string

RenderResult renders a single check result.

func (*TUIRenderer) RenderSummary

func (r *TUIRenderer) RenderSummary(summary checks.Summary) string

RenderSummary renders the final summary.

func (*TUIRenderer) RenderTitle

func (r *TUIRenderer) RenderTitle() string

RenderTitle renders the doctor title.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL