printer

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFixReport

func FormatFixReport(result *validator.FixResult) string

FormatFixReport formats a fix result as a report string

func FormatValidationReport

func FormatValidationReport(result *validator.ValidationResult) string

FormatValidationReport formats a validation result as a report string

func HasActiveFilters

func HasActiveFilters(filter *fogit.Filter) bool

HasActiveFilters checks if any filter criteria are set

func IsValidFormat

func IsValidFormat(format string) bool

IsValidFormat checks if the output format is supported

func IsValidOutputFormat

func IsValidOutputFormat(format string) bool

IsValidOutputFormat checks if the format is a valid output format

func IsValidShowFormat

func IsValidShowFormat(format string) bool

IsValidShowFormat checks if the output format is supported

func OutputAsJSON

func OutputAsJSON(w io.Writer, data interface{}) error

OutputJSON writes any data as JSON to the writer

func OutputAsYAML

func OutputAsYAML(w io.Writer, data interface{}) error

OutputYAML writes any data as YAML to the writer

func OutputCSV

func OutputCSV(w io.Writer, features []*fogit.Feature) error

OutputCSV writes features as CSV to the writer

func OutputFeatureJSON

func OutputFeatureJSON(w io.Writer, feature *fogit.Feature) error

OutputFeatureJSON writes feature as JSON to the writer

func OutputFeatureText

func OutputFeatureText(w io.Writer, feature *fogit.Feature, showRels, showVers bool) error

OutputFeatureText writes feature as formatted text to the writer

func OutputFeatureYAML

func OutputFeatureYAML(w io.Writer, feature *fogit.Feature) error

OutputFeatureYAML writes feature as YAML to the writer

func OutputFeaturesForFile

func OutputFeaturesForFile(w io.Writer, filePath string, features []*fogit.Feature) error

OutputFeaturesForFile prints features associated with a file

func OutputFilesForFeature

func OutputFilesForFeature(w io.Writer, feature *fogit.Feature) error

OutputFilesForFeature prints files associated with a feature

func OutputFilesSummary

func OutputFilesSummary(w io.Writer, features []*fogit.Feature) error

OutputFilesSummary prints a summary of file associations

func OutputFormatted

func OutputFormatted(w io.Writer, format string, data interface{}, textFn func(io.Writer) error) error

OutputFormatted outputs data in the specified format For text format, it calls the provided textFn function

func OutputJSON

func OutputJSON(w io.Writer, features []*fogit.Feature) error

OutputJSON writes features as JSON to the writer

func OutputRelationshipsJSON

func OutputRelationshipsJSON(w io.Writer, feature *fogit.Feature, outgoing []fogit.Relationship, incoming []features.RelationshipWithSource) error

OutputRelationshipsJSON prints relationships in JSON format

func OutputRelationshipsText

func OutputRelationshipsText(w io.Writer, feature *fogit.Feature, outgoing []fogit.Relationship, incoming []features.RelationshipWithSource) error

OutputRelationshipsText prints relationships in text format

func OutputStats

func OutputStats(w io.Writer, stats *features.RepoStats, details bool) error

OutputStats prints repository statistics

func OutputTable

func OutputTable(w io.Writer, features []*fogit.Feature) error

OutputTable writes features as a formatted table to the writer

func OutputTree

func OutputTree(w io.Writer, root *fogit.Feature, allFeatures []*fogit.Feature, hierarchyTypes []string, maxDepth int) error

OutputTree prints a hierarchical tree of features

func PrintFixResult

func PrintFixResult(result *validator.FixResult)

PrintFixResult outputs fix results to stdout

func PrintSuggestions

func PrintSuggestions(w io.Writer, identifier string, suggestions []search.Match, commandExample string)

PrintSuggestions prints "Did you mean?" suggestions for a missing feature

func PrintValidationResult

func PrintValidationResult(result *validator.ValidationResult)

PrintValidationResult outputs validation results to stdout

Types

type Format

type Format string

Format represents an output format

const (
	FormatText Format = "text"
	FormatJSON Format = "json"
	FormatYAML Format = "yaml"
	FormatTree Format = "tree"
)

Jump to

Keyboard shortcuts

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