Documentation
¶
Index ¶
- func JSON(w io.Writer, value any) error
- func MarshalYAML(value any) ([]byte, error)
- func Name(w io.Writer, names []string) error
- func Table(w io.Writer, columns []Column, rows []map[string]string) error
- func YAML(w io.Writer, value any) error
- func YAMLMulti(w io.Writer, values []any) error
- type Column
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalYAML ¶ added in v0.3.3
MarshalYAML returns value encoded as YAML indented by 2 spaces. It is the only go.yaml.in/yaml/v3 encoder in drydock (a forbidigo rule keeps it that way). The width is not only style: at yaml.v3's default of 4, a block scalar inside a sequence item whose text starts with a newline or a space gets an indentation indicator that disagrees with the column its content is written at. Parsers reject such a document, or, when every line starts with the same spaces, silently read the text back without them.
Types ¶
Click to show internal directories.
Click to hide internal directories.