export

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name  string
	Count int // records written
}

type Format

type Format int

Format defaults to JSON at its zero value, as -f does.

const (
	JSON Format = iota
	CSV
	CookieEditor
)

func ParseFormat

func ParseFormat(value string) (Format, error)

type Output

type Output struct {
	Dir   string
	Files []File
	Zip   string
}

Output is what a clean Close left in the output dir: each category file in category order, and the zip with --zip.

type Writer

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

func NewWriter

func NewWriter(dir string, format Format, compress bool) (*Writer, error)

NewWriter creates dir. With compress, Close packs the files it wrote into <dir>/<base of dir>.zip.

func (*Writer) Close

func (w *Writer) Close() error

Close completes the files even after a failed Write, so they keep what was written; only a clean run fills Output.

func (*Writer) Output

func (w *Writer) Output() Output

func (*Writer) Write

func (w *Writer) Write(dataCategory category.Category, records []record.Record) error

Write reorders records in place.

Jump to

Keyboard shortcuts

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