package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

Align renders document d with the space-based nesting level set to the current column.
AlignUnder aligns nested to the right of head, and, if this does not fit on the line, nests nested under head.
BracketDoc is like Bracket except it accepts Docs instead of strings.
Concat is the <> constructor.
ConcatDoc concatenates two Docs with between.
ConcatLine concatenates two Docs with a Line.
ConcatSpace concatenates two Docs with a space.
Fillwords fills lines with as many docs as will fit joined with a space or line.
Fold applies f recursively to all Docs in d.
FoldMap applies f recursively to all Docs in d processed through g.
Group will format d on one line if possible.
Join joins Docs d with string s and Line.
JoinDoc joins Docs d with Doc s.
JoinGroupAligned nests joined d with divider under head.
JoinNestedOuter attempts to de-indent the items after the first so that the operator appears in the right margin.
JoinNestedRight nests nested with string s.
Keyword is identical to Text except they are filtered by keywordTransform.
NestS is the NESTS constructor.
NestT is the NESTT constructor.
NestUnder nests nested under head.
Pretty returns a pretty-printed string for the Doc d at line length n and tab width t.
Stack concats Docs with a Line between each.
Table defines a document that formats a list of pairs of items either: - as a 2-column table, with the two columns aligned for example: SELECT aaa bbb FROM ccc - as sections, for example: SELECT aaa bbb FROM ccc We restrict the left value in each list item to be a one-line string to make the width computation efficient.
Text is the TEXT constructor.

# Constants

TableLeftAlignFirstColumn left-aligns (right-pads) the first column.
TableNoAlign does not use alignment and instead uses NestUnder.
TableRightAlignFirstColumn right-aligns (left-pads) the first column.

# Variables

ErrPrettyMaxRecursionDepthExceeded is returned from Pretty when the maximum recursion depth of function invoked by Pretty is exceeded.
HardLine is a newline and cannot be flattened.
Line is a newline and is flattened to a space.
Nil is the NIL constructor.
SoftBreak is a newline and is flattened to an empty string.

# Structs

TableRow is the data for one row of a RLTable (see below).

# Interfaces

Doc represents a document as described by the type "DOC" in the referenced paper.

# Type aliases

TableAlignment should be used as first argument to Table().