table

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table interface {
	// Load loads a table from a csv file
	Load(filename string) error
	// Save saves a table to a csv file
	Save(filename string) error
	// Fields returns the fields of the table
	Fields() []string
	// Rows returns the rows of the table
	Rows() [][]string
	// SetFields sets the fields of the table
	SetFields([]string)
	// SetRows sets the rows of the table
	SetRows([][]string)
	// FieldIndex returns the index of a field, or -1 if it doesn't exist
	FieldIndex(string) int
	// AppendRows appends rows to the table
	AppendRows(...[]string)
	// Sort sorts the table by a field
	Sort(string)
	// SortFunc sorts the table by a function
	SortFunc(func(row1, row2 []string) int)
}

func New

func New() Table

Jump to

Keyboard shortcuts

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