On this page
Colored terminal output: the summary block, combined and split format tables, width adaptation and cell truncation, the legend, and error formatting.
#internal/render
#internal/render
Package render produces the colored terminal output: summary section, format tables, legend, and the extensionless-file list.
#Options
type Options structOptions controls table rendering. All fields are presentation-only and never affect JSON output.
#FormatError
func FormatError(colored bool, theme config.Theme, format string, args ...interface{}) stringFormatError renders one stderr error line: "error:
#DetectThemeName
func DetectThemeName() stringDetectThemeName picks "dark" or "light" from the COLORFGBG environment variable ("fg;bg"). Backgrounds 7, 15, and 9-14 indicate a light terminal; anything else (or no clear signal) defaults to dark.
#Render
func Render(w io.Writer, res *scan.Result, opts Options)Render writes the full table-mode output for a scan result.