output

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultColumns = []string{
	"sample_accession",
	"organism",
	"tissue",
	"age",
	"sex",
	"disease",
}

DefaultColumns lists sensible defaults for BioSample queries.

Functions

func Format

func Format(w io.Writer, rows []Row, columns []string, format string) error

Format writes rows to w in the requested format. Supported formats: tsv, csv, json, table.

func InferColumns

func InferColumns(rows []Row) []string

InferColumns collects all keys from rows, sorts them alphabetically, and puts sample_accession first if present.

func IsTerminal

func IsTerminal() bool

func ResolveFormat

func ResolveFormat(format string) string

Types

type Row

type Row map[string]string

Row is a single result row, mapping column name to string value.

Jump to

Keyboard shortcuts

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