export

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package export writes result sets to CSV, JSON and Markdown.

Export formatting is deliberately separate from the grid's: the grid abbreviates for the eye — "NULL" for absence, an ellipsis for long values — while an export has to be faithful, because something else will read it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSV

func CSV(w io.Writer, columns []string, rows [][]any) error

CSV writes columns and rows as comma-separated values.

func JSON

func JSON(w io.Writer, columns []string, rows [][]any) error

JSON writes columns and rows as an array of objects.

func Markdown added in v0.9.0

func Markdown(w io.Writer, columns []string, rows [][]any) error

Markdown writes columns and rows as a pipe table.

A table with no columns is written as nothing at all: "| |" is not a table, and a paste that contains it looks like a bug rather than an empty result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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