render

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render turns a (masked) result into the text an agent sees: TSV or JSON, within the profile's row, cell and output caps. It is lockkit's table renderer over a locksql result: control and bidirectional characters are escaped, invalid UTF-8 is replaced, NULL is "NULL" (null in JSON), binary values are "<bytes:N>" and times ISO 8601.

Index

Constants

View Source
const (
	FormatTSV  = krender.FormatTSV
	FormatJSON = krender.FormatJSON
)

Formats.

Variables

This section is empty.

Functions

func Render

func Render(w io.Writer, res engine.Result, l config.Limits, format string) error

Render writes res to w in format "tsv" (the default when empty) or "json". Limits that are zero or negative take the non-production defaults. Rows beyond MaxRows are dropped and reported as truncated; rows that would push the output past MaxOutputBytes are dropped with a marker.

Types

type Table added in v0.3.0

type Table = krender.Cells

Table is the TSV rendering of a result split into cells: the header labels, the rows shown and the lines after them (cut marker, row count).

func TSVTable added in v0.3.0

func TSVTable(res engine.Result, l config.Limits) Table

TSVTable is what Render writes in format tsv for a result with columns, before the cells are joined.

Jump to

Keyboard shortcuts

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