Help us shape the future of Go! Take the 2026 Go Developer Survey

render

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package render presents CodeSignal reports and project-readiness results as the CLI's text and JSON output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadinessJSON

func ReadinessJSON(result *projectreadiness.Result) ([]byte, error)

ReadinessJSON renders result as its canonical JSON representation followed by exactly one trailing newline.

func ReadinessText

func ReadinessText(result *projectreadiness.Result) string

ReadinessText renders result as deterministic, ANSI-free plain text. It encodes exactly the same status, gaps, and next actions as ReadinessJSON -- no drift between the two renderers.

func ReportJSON

func ReportJSON(report *codesignal.Report) ([]byte, error)

ReportJSON renders report as its canonical JSON representation followed by exactly one trailing newline, with no CLI-only wrapper fields added.

func ReportText

func ReportText(report *codesignal.Report) string

ReportText renders report as deterministic, ANSI-free plain text.

func ReportTextWithOptions

func ReportTextWithOptions(report *codesignal.Report, opts TextOptions) string

ReportTextWithOptions renders like ReportText. SeeAllCommand is printed verbatim into the report, so the caller shall have already made it safe for a terminal.

Types

type TextOptions

type TextOptions struct {
	// SeeAllCommand is the invocation that shows every signal a narrowed
	// report withheld. It is text-only presentation and never enters the JSON
	// report. Empty means that, when something was withheld, the line says to
	// re-run without the narrowing flags in effect instead of naming a command.
	SeeAllCommand string
}

TextOptions carries what only the caller knows about how a report was produced.

Jump to

Keyboard shortcuts

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