output

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(table [][]string) string
}

Encoder is an interface for encoding a table to a string

var (
	// CSVEncoder encodes a table to CSV
	CSVEncoder Encoder = csvOut{}
	// JSONEncoder encodes a table to JSON
	JSONEncoder Encoder = jsonOut{}
	// MarkdownEncoder encodes a table to Markdown
	MarkdownEncoder Encoder = markdownOut{}
	// YAMLEncoder encodes a table to YAML
	YAMLEncoder Encoder = yamlOut{}
)

type Format

type Format uint8

Format enum for output types

const (
	Markdown Format = iota
	JSON
	CSV
	YAML
)

Jump to

Keyboard shortcuts

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