tsv

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tsv is the one reader for the record files the gates hold the code against — API verdicts, field verdicts, live-driver waivers, coverage exemptions — so they cannot disagree about blank lines, comments, a trailing TAB or a key listed twice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Row

type Row struct {
	Fields []string
	Line   int
}

Row is one record line: its fields, and the line it came from.

func Parse

func Parse(r io.Reader, name string, cols int) ([]Row, []string)

Parse reads tab-separated records from r, skipping blank lines and lines starting with #. cols is how many fields a row must carry, and the first field is a key that must be unique. name is what problems are reported against.

Problems are returned rather than raised, so a person editing the file sees every mistake at once.

func Read

func Read(path string, cols int) ([]Row, []string)

Read reads a tab-separated record file. See Parse.

Jump to

Keyboard shortcuts

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