lib

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const RWRR = 0755

Variables

This section is empty.

Functions

func Exists added in v1.2.0

func Exists[K comparable, V any](m map[K]V, v K) bool

generic map.Exists(key)

func FilterByPattern added in v1.2.0

func FilterByPattern(conf cfg.Config, input io.Reader) (io.Reader, error)

func PrepareColumnVars added in v1.3.0

func PrepareColumnVars(columns string, data *Tabdata) ([]int, error)

func PrepareColumns

func PrepareColumns(conf *cfg.Config, data *Tabdata) error

parse columns list given with -c, modifies config.UseColumns based on eventually given regex. This is an output filter, because -cN,N,... is being applied AFTER processing of the input data.

func PrepareSortColumns added in v1.3.1

func PrepareSortColumns(conf *cfg.Config, data *Tabdata) error

output option, prepare -k1,2 sort fields

func PrepareTransposerColumns added in v1.3.0

func PrepareTransposerColumns(conf *cfg.Config, data *Tabdata) error

Same thing as above but for -T option, which is an input option, because transposers are being applied before output.

func ProcessFiles

func ProcessFiles(conf *cfg.Config, args []string) error

func ValidateConsistency added in v1.2.2

func ValidateConsistency(data *Tabdata) error

validate the consitency of parsed data

Types

type Tabdata

type Tabdata struct {
	// contains filtered or unexported fields
}

contains a whole parsed table

func FilterByFields added in v1.2.0

func FilterByFields(conf cfg.Config, data *Tabdata) (*Tabdata, bool, error)

* Filter parsed data by fields. The filter is positive, so if one or * more filters match on a row, it will be kept, otherwise it will be * excluded.

func Parse added in v1.0.12

func Parse(conf cfg.Config, input io.Reader) (Tabdata, error)

Parser switch

func PostProcess added in v1.3.0

func PostProcess(conf cfg.Config, data *Tabdata) (*Tabdata, bool, error)

func TransposeFields added in v1.3.0

func TransposeFields(conf cfg.Config, data *Tabdata) (*Tabdata, bool, error)

* Transpose fields using search/replace regexp.

func (*Tabdata) CloneEmpty added in v1.2.0

func (data *Tabdata) CloneEmpty() Tabdata

Jump to

Keyboard shortcuts

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